Skip to content

Make MUMC Run FASTERRRRRR

terrelsa13 edited this page Sep 22, 2024 · 6 revisions

Yes We Can Run Faster

  • As mentioned here: DEBUG
    • The more we print to the console the slower the script runs
    • MUMC will run faster and process all media types for each user in parallel if we "mute" the two noisiest console outputs.
      • DEBUG
      • console_controls for media_items

Disable DEBUG

Debugging is easily disabled by setting DEBUG: 0

DEBUG: 0

Disable The Console Output Of All media_items For Each User

Disabling the console output for all media_items can be done by adding console_contols: under advanced_settings: in the configuration file.

advanced_settings:
  console_controls:
    movie:
      delete:
        show: false
      keep:
        show: false
    episode:
      delete:
        show: false
      keep:
        show: false
    audio:
      delete:
        show: false
      keep:
        show: false
    audiobook:
      delete:
        show: false
      keep:
        show: false

What Now?

The next time MUMC is run you will notice two things.

  1. The DELETE AND KEEP status for individual media_items will no longer be shown.
  2. MUMC will finish in less time.

How Did These Configuration Settings Make MUMC Faster?

Because we are not printing individual media_items to the console, behind the scenes MUMC will enable multiprocessing. This allows MUMC to filter for each media type (i.e. movies, episodes, audio, and audiobooks) in parallel for each user. The same happens in the post-processing stage of the script.

Why Not Always Use Multiprocessing?

When mulitprocessing is used, there is no easy way to control the order individual media items are printed to the console. There would be a seemingly random output of movies, episodes, audio, and audiobooks displayed. Becaue of this, certain critera must be met for MUMC to enable multiprocessing.

But, More Information Is Better

Not always. But, you do you.

In this case less information is considered acceptable because the assumption is MUMC will be run during off-peak hours and the script is run periodically using something like cron in Linux.

Don't Worry

The Summary Of Deleted Media is still shown to allow those who log the output of MUMC to keep a history of which media_items were deleted.

If you do not like seeing less information. You can set all of the show: false values to show: true. Or delete the entire console_controls section. This will again show all of the sweet sweet information you crave.

Clone this wiki locally