> Chris @ IT wrote: > > I have this application that loads DLL's dynamically as plugins and as > such > > I use the loadlibrary, getprocaddress, free library routines. > > > > The host application loads the dll and calls its process export > function so > > that the dll can do what its meant to do. The problem is there are > usually > > many requests to be done (about 500 every second) and when I call the > dll > > for each sequentially its takes quite a bit of time > > > > What I want to try is spawn a new thread that loads the dll and calls > the > > function. With this approach the dll will be loaded many times and its > > function called many times. Hi Chris, what makes you think, the bottleneck can be the amount of executable code in the DLLs? Loading two DLLs which provide two different functions to two different threads will not run faster than one DLL with both functions in it. The point you are thinking about is: How is the CPU-time shared between these both treads. Well, that is something you may influence. the Sleep function at least gives the remainder of the current time-slice to other threads waiting for execution and last, but not least there is something named a process-priority which can be lowered easily. putting sleep(0) calls into the right places of the long enduring function may to the task already. Tampering with the priority can affect overall system performance, so be careful! have fun Bob
------------------------ Yahoo! Groups Sponsor --------------------~--> <font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12hp61mck/M=362131.6882499.7825260.1510227/D=groups/S=1705115362:TM/Y=YAHOO/EXP=1124179802/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org ">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life - brought to you by One Economy</a>.</font> --------------------------------------------------------------------~-> ----------------------------------------------------- Home page: http://groups.yahoo.com/group/delphi-en/ To unsubscribe: [EMAIL PROTECTED] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/delphi-en/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

