Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to force Windows to pre-load certain EXE/DLL binaries into its prefetch/superfetch cache as if they had been executed? I have a particular application that loads pretty slowly on first run but if it's "warm" (recently executed) it starts pretty quickly. I'd like to prime the cache early in the background before the application is needed. But since it shows a UI, I'm looking for a way to do this silently. So simply launching the application it isn't ideal.

Thanks you in advance.


Prompted by David's suggestion in the comments, I wrote a PowerShell script to memory map the files, seek to the end, and close them. I haven't done any controlled tests yet and it could just be my imagination, but Sublime Text (the application in question) appeared to load much more quickly this time around and I haven't used it for several hours.

share|improve this question
1  
Just never turn your machine off. –  martineau Dec 5 '12 at 19:13
    
Yeah, prefetch/superfetch doesn't work that way but thanks. –  Josh Dec 5 '12 at 19:27
    
BTW, never turning it off doesn't mean you can't put it to Sleep/Standby or Hibernate mode. –  martineau Dec 5 '12 at 19:31
    
Keeping the machine on doesn't keep the binaries warm in cache. If they aren't used, they'll quickly be purged from memory as other applications are launched. I'll probably wind up having to go with a ramdisk & copy on boot. Bleh. –  Josh Dec 5 '12 at 19:43
1  
You would write a program that opens those files, memory maps them, and periodically reads from the mappings. –  David Schwartz Dec 5 '12 at 20:57

1 Answer 1

Check the documentation for your program (or just experiment with it; e.g., from a Command Prompt).  See whether there’s anything you can put on the command line that will cause it to exit immediately.  If it displays the GUI even in this mode, run it from a shortcut that has the “Run” control set to “Minimized”:

                                shortcut properties window with Run = Minimized circled

Another approach is to write a batch file that starts your program minimized (with START /MIN), waits a few seconds, and then kills it.

share|improve this answer
    
Unfortunately there is no command line argument to start it without a GUI or to make it exit immediately. I can of course start it with PowerShell then sleep a second, then kill it, but that would be disruptive. Also the option to run minimized is simply a suggestion for the application which unfortunately it does not honor. –  Josh Dec 6 '12 at 21:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.