[DUG] DLL loading slowed by anti-virus
Jolyon Direnko-Smith
jsmith at deltics.co.nz
Tue Sep 22 15:23:30 NZST 2015
Hi Ross,
Rather than have an application load 30 DLLS (none of which it uses) for
the sake of another application which might use as few as just 2 of those
30 and only ever one at a time, why not simply cache each loaded DLL in the
application that is actually using them ?
I would hope that your function references to the DLL exports are already
maintained in a record or even behind a class facade, which would make a
cache simplicity itself to implement. If not, introducing such a facade
should be straightforward enough.
With such a cache you still get the initial delay but only for the first
use and only for the DLL's actually being used and it eliminates any
question about (or possible future variance in) the module loading
behaviour of the OS or any problems arising as a result of your "loader"
application failing to have loaded at/by the required or expected time etc.
--
Jolyon
On 22 September 2015 at 14:42, Ross Levis <ross at stationplaylist.com> wrote:
> My automation app loads 1 of perhaps 30 different 3rd party DLL’s
> depending on the job required. It only has to do 1 job at a time and if
> the job changes (automatically), the current DLL is unloaded and the
> relevant one is loaded using LoadLibrary. All the DLL’s have the same
> interface/functions.
>
>
>
> It seems in recent times that the loading of a DLL is taking much too long
> for many customers, sometimes several seconds, which isn’t acceptable, and
> it appears to be related to anti-virus software scanning the DLL every time
> it loads, or at least the first time it has loaded on that day. That seems
> to vary in different anti-virus software.
>
>
>
> I need to remove that delay. I would rather the main app not load every
> single DLL at startup as that would take a long time to load, and often
> only 2 or 3 of the DLL’s will ever be used by a customer.
>
>
>
> There are 2 apps loaded at the same time and rather than altering the app
> that loads the DLL’s and does all the work, my thought was to have this 2
> nd app load all the DLL’s in the folder using a thread.
>
>
>
> Am I correct that a 2nd app loading the same DLL will not actually load
> the DLL from the hard drive but just access it from RAM, so it should load
> very quickly?
>
>
>
> Cheers,
>
> Ross.
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at listserver.123.net.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at listserver.123.net.nz with
> Subject: unsubscribe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20150922/71d8224e/attachment.html
More information about the Delphi
mailing list