DHL Posted February 9, 2012 Posted February 9, 2012 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 :-)
DHL Posted February 12, 2012 Author Posted February 12, 2012 Method A. Works, but I would rather get this to work without having to see the windows opening/closing
AdmiralAlkex Posted February 12, 2012 Posted February 12, 2012 Why does it matter? Unless the user has never used a computer before they will expect applications to load faster the second time. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
Spiff59 Posted February 13, 2012 Posted February 13, 2012 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.
DHL Posted February 15, 2012 Author Posted February 15, 2012 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now