2

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.

bertieb
  • 7,543
Josh
  • 976

1 Answers1

0

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.