0

Is it possible to load your WPF application when the machine starts up? Our WPF application is taking 30 seconds on our existing client hardware, and we'd like to "hide" that by having our application startup when the machine is booted. But the fact that our application boots on startup should be invisible to the user.

How would we go about building such a thing? Is there a term to google that will provide a tutorial? It would be nice if there's a WPF specific-one we can grab.

Note: In case there's any moral qualms to this (since I agree that having 20 programs startup when your computer does is frustrating!), we're building software for a specialized industry who will be using their computer to run primarily our applications.

chocojosh
  • 897
  • 2
  • 11
  • 16
  • Can you tell is what it is loading/preparing? This delay can't be from WPF. – H H Aug 02 '10 at 14:50
  • Our client machines are a bit outdated (Win XP, Intel Pentium M 1.4 GHz, 760 MB RAM) -- on my dev machine a cold start is about 13 seconds instead of 27. Our other application (we're building two simultaneous apps) I imagine the biggest hits are the DevComponents UI Framework, and a TTS Engine (is there a way to check how long each DLL takes to load?) Process Explorer is reporting 21 "System DLLs" (e.g. System.*, PresentationFramework, PresentationFramework.Aero, WPFToolkit), and 9 DLLs for our projects (4 of which are resources; bilingual application). – chocojosh Aug 02 '10 at 15:08

2 Answers2

3

The easiest approach would be

  • make sure your big libraries are installed in the GAC
  • write a dummy app that uses (most of) those libs. Actually use them so they get loaded.
  • run the dummy on startup
  • make the dummy stop by itself, or keep it alive hidden

This would in no way interfere with the starting of the normal application. The benefit is that the libraries get loaded and jitted. The drawback that your app still needs to load & initialize.

H H
  • 263,252
  • 30
  • 330
  • 514
0

Sasha had a few more tips not listed here, rebasing your modules, leveraging the prefetch facility and compression (UPX, yuk!).

RandomNickName42
  • 5,923
  • 1
  • 36
  • 35