Sign in to follow this  
Followers 0
DHL

Optimize large application/file load time using AutoIT

5 posts in this topic

Hi, guys.

I've made a "file-launcher"-program that opens different file formats, sets them in fullscreen (where available) and moves the application windows to secondary screen in a multi monitor setup. My code consists of different autoit "application-wrappers" that run e.g. adobe reader, office powerpoint, office word, etc. through command line.

As explained in this thread at stackOverflow: http://stackoverflow.com/questions/560363/large-application-file-load-time I experience that the first time a pdf or pptx is loaded in Adobe Reader or Office PowerPoint, the load time is much longer the first time than the second time (after closing said application and loading a different pdf or pptx file). From the StackOverflow thread i learned that this has to do with caching and Windows's way of keeping dll's in memory (just in case it needs them again in a short while, which is a good assumption).

What I want to accomplish is to make the first application/file load time faster. As I see it I am left with a couple of options:

A.

Launch said applications when starting my application, waiting for their windows to be available, then close them - as in forcing them to load their dll's into memory an hoping that Windows keeps the dll's around for some time.

B.

Use DllOpen, _WinAPI_LoadLibrary or some other method to load adobe reader and office application code/dll's into memory in the background.

I believe a solution closer to B is better as It looks better (no visible windows beeing opened and closed) and I have more control over the loaded dll's (probably?)

Do you guys have any suggestions as to how I should attack this problem? I am quite new to windows programming/optimization and I don't fully understand the Windows architecture, so I need all the help I can get.

Thanks for a great community :-)

Share this post


Link to post
Share on other sites



Method A. Works, but I would rather get this to work without having to see the windows opening/closing

Share this post


Link to post
Share on other sites

I don't think your Option A would be very successful, as there's no guarantee that Windows is going to preserve a particular memory space once you've closed the related application and opened others. There are startup routines like "Adobe QuickLaunch" and one for Office as well I believe that might seem to help somewhat, but they just make you wait longer at boot time. Frankly, your whole question screams for a hardware solution in my opinion. Stick a Solid State Drive in there (a SATA III SSD on a mobo supporting SATA III is amazing!), or RAID (stripe) two or three drives you have laying around. There's really no overcoming the fact that you need to load a set amount of data from a mechanical medium that has a limited throughput.

Share this post


Link to post
Share on other sites

Thanks for the replies. I believe you are right about a hardware solution being the best alternative, Spiff59. However, for low-end computers, a pre-loading solution might be an alternative.

If I somehow find a smart way to pre-load the files before they are used, without imposing high system load at critical moments (such as when playing a powerpoint slide with an embedded movie). I've solved it.

I wish everyone owned SSD's :-P

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0