• jPV
  • Paladin of the Pegasos
    Paladin of the Pegasos
    Posts: 1905 from 2003/2/24
    From: po-RNO

    Papiosaur wrote:
    Size of all Hollywood plugin is 16Mb, if all plugins are loaded in memory at startup maybe it's big (i didn't know that).
    Maybe the best solution will be to move LIBS:Hollywood/plugins to another path for example DATA:Hollywood and add an assign like this

    This doesn't help, because plugins aren't loaded at the system startup. They are loaded when you launch a Hollywood program, and if it finds the plugins, the location doesn't matter. So, they don't consume memory unless you launch a program made with Hollywood.

    If you launch a Hollywood program on a system that has all those plugins installed into LIBS:, it will consume 16 MB more memory than when launched on a system that has no plugins installed globally. This is 16 MB wasted even though the program doesn't use any of the plugins in its operation.

    It will also slow down the program startup little, on my Powerbook 1.67GHz a simple test program took 1.64 seconds to start when I had all plugins available, and 0.45 seconds when I didn't have the plugins available. This is noticeable difference if you start/quit a program often/constantly, especially if you'd have a slower machine.

    Hollywood plugins also aren't shared libraries even though they reside in the libs: directory. If you launch another program while the first one is running, it can't use the plugins that are loaded in the memory by other program, but loads all plugins again. The more you have programs running, the more memory is wasted. With the currently available plugins, it actually isn't the whole 16 MB next programs take, because the Polybios plugin makes an exception as it contains an external decoder program that is shared by other instances of the actual plugin, and that saves over 6 MB for the next launches, but almost 10 MB still.

    So it's a decision between wasting 10-16 MB (minus the required plugins) per running program + slower startup of programs, or wasting a bit HD space for having exactly the required plugins for each program.

    I think this behaviour was designed to make the plugins work a bit like Datatypes, user could install a new picture plugin and his picture viewer would then automatically recognize the new format etc. But it's revealed to be quite rare situation in practise, and that's why the next Hollywood version stops loading all global plugins at program startup, only plugins requested by the program will be loaded then unless otherwise defined. There are just too many drawbacks compared to the gain with the current default behaviour.

    I'd say that typical programs usually need only 0-3 plugins, so unless it's a monsterous bloated all-in-one program, it's a total waste to load all 30 plugins for each running program in my opinion.
  • »09.10.20 - 19:04
    Profile Visit Website