View Full Version : LoadPlugin memory Question
buzzqw
21st October 2005, 18:15
i have few question about plugin
1) More loaded plugin (even if not used) more memory used ?
2) More loaded plugin (even if not used) will slow down encoding ?
i ask this question because i usually use a defalut avs so fitted
LoadPlugin("C:\filter\dgdecode.dll")
LoadPlugin("C:\filter\autocrop.dll ")
LoadPlugin("C:\filter\undot.dll")
LoadPlugin("C:\filter\Simpleresize.dll")
LoadPlugin("C:\filter\FluxSmooth.dll")
LoadPlugin("C:\filter\blockbuster.dll")
LoadPlugin("C:\filter\Mipsmooth.dll")
LoadPlugin("C:\filter\Tomsmocomp.dll ")
LoadPlugin("C:\filter\Kerneldeint.dll")
LoadPlugin("C:\filter\cnr2.dll")
LoadPlugin("C:\filter\Convolution3D.dll")
LoadPlugin("C:\filter\RemoveGrain.dll")
LoadPlugin("C:\filter\MaskTools.dll")
LoadPlugin("C:\filter\Mvtools.dll")
LoadPlugin("C:\filter\MSharpen.dll")
LoadPlugin("C:\filter\UnFilter.dll")
LoadPlugin("C:\filter\deen.dll")
LoadPlugin("C:\filter\tdeint.dll")
LoadPlugin("C:\filter\LeakKernelDeint.dll")
LoadPlugin("C:\filter\ColorMatrix.dll")
LoadPlugin("C:\filter\DctFilter.dll")
LoadPlugin("C:\filter\deen.dll")
LoadPlugin("C:\filter\fft3dfilter.dll")
LoadPlugin("C:\filter\degrainmedian.dll")
rarely i use more than one filter (of those listed) but i load always all.
a good advice ?
Thanks in advance
BHH
gzarkadas
22nd October 2005, 01:32
Since you are loading dlls, the more you load the more memory you occupy. This is not a crucial point thow, unless your computer's memory is very low (filter dlls usually occupy a small piece of overall computer's memory) or you want the last bit of performance.
I believe there is always a speed penalty regarding the total script execution time, since the OS has to do work to load the dll (hard disk reads, relocation of dll image's pointers, etc.) and Avisynth has to call for each dll its initialisation function, register the functions exported by the filters and update its internal structures.
Regarding the video encoding, it does not seem probable that the not-used dlls directly affect the execution speed; its just code that sits waiting to be called. There will be an indirect effect though if the script requires the use of virtual memory for its completion, since the extra amount of memory occupied by the dlls will require an extra number of page hits, thus extra hard disk access.
I would suggest that if you regularly use only a small number of filters you shouldn't load all. This also results in better documentation of your script and better control of dependencies.
If you find your self working most of the time with specific filter configurations it may worth to group them into separate .avs files with descriptive names and just execute an
Import("{config-filename}")
into your scripts ;) .
kaizoku
22nd October 2005, 06:15
why not just put #'s in front of the filters u dont use ;-)
communist
22nd October 2005, 17:59
Why not use AviSynths's autoload feature? Just set "c:\filter\" as your plugin directory in the registry and AviSynth will load them automatically - no need for LoadPlugin (except for 'problematic' plugins).
Aquilonious
23rd October 2005, 03:44
Why not use AviSynths's autoload feature? Just set "c:\filter\" as your plugin directory in the registry and AviSynth will load them automatically - no need for LoadPlugin (except for 'problematic' plugins).
Hey, thanks for the tweak! :thanks:
Just for added measure I copied all the filters from my AviSynth Plugins folder to my new one (c:\other\plugins\).
Gerard V
28th May 2006, 06:17
Having read this thread, would I be right to assume that people who still use LoadPlugin() for avisynth scripts versus using the plugins folder are doing so because of a personal style preference, or is there another reason why people still use it?
neuron2
28th May 2006, 06:35
As a plugin developer, I want to specify filters manually. Otherwise I have to keep copying the new builds to the plugins directory, which is an inconvenience. Yes, I suppose I could automate that but it's easier for me this way.
communist
28th May 2006, 07:04
Having read this thread, would I be right to assume that people who still use LoadPlugin() for avisynth scripts versus using the plugins folder are doing so because of a personal style preference, or is there another reason why people still use it?
Some plugins just have to be loaded manually so that you can use plugins for older versions of Avisynth (LoadPluginEx & Dust for ex.).
There is also the problem that after a certain amount of plugins Avisynth wont load additional plugins / functions anymore.
Last but not least - sometimes a plugin will crash Avisynth / the program opening the script completely (VirtualDub just closes itself), so you will have to empty your plugin dir to find out which one is causing trouble.
But most of the time it is very convenient to just throw in filters and functions without having to load or import them manually :)
foxyshadis
28th May 2006, 07:27
2.5.7 fixes the problems with having too many plugins, but it still isn't final. There are still some older plugins that destablize avisynth, though, and should be kept out (mpeg2dec3 for example, although it's long since surpassed by dgdecode).
Gerard V
28th May 2006, 08:40
Thanks for the comprehensive answers folks. It makes sense to me now. :)
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.