Skip to content

Improving WPF Application Cold Start User Experience – 2 techniques

September 5, 2006

Henry Hahn, Tim Cahill (not the football/soccer player) and other members of the WPF performance team have made great strides over the last year helping the entire WPF team improve performance.  They have also helped customers understand why profiling their code is essential to diagnose any performance issues. 

Anyway, here are 2 techniques that will improve user experience with WPF’s first version (.NetFx 3).

Build a splash screen into your application

Henry has (or will soon) posted a sample on how to build an unmanaged splash screen into WPF applications.  This technique launches a GDI based splash screen in just over 1 second.

I’ll update this section to point to the splash screen when it is available.

Configure Font Cache Service to Start

When you install .NetFx 3.0 on a machine, it installs a FontCache service that is set to turn on Manually.

When the first WPF application starts up, if the FontCache service is not running, it is started.  Its purpose iis to help share font glyph information between WPF applications.

My Windows Vista RC1 laptop is now configured so that the "Windows Presentation Foundation Font Cache 3.0.0.0" service has a startup type of "Automatic (Delayed Start)".  Cold start of the first WPF application after boot is now faster.  We didn’t want to turn this on by default because only WPF application users would see any benefit from it.

From → WPF

4 Comments
  1. Adam permalink

    Hi! Rob, how could we config FontCache service in Vista?

  2. Rob permalink

    open control panel, type service in the search box in top right.
    1st hit will be Administrative Tools: View Local Services.  Click on View Local Services.
     
    A management console pops up…scroll down to "Windows Presentation Foundation Font Cache 3.0.0.0.
    Right click, choose properties.
    Change startup type to desire setting…i use Automatic (Delayed Start).
    Thx, Rob
     
     

  3. Adam permalink

    Hi! Rob, Thanks for your answer. One more guestion, does Vista MCE gain benifit from FontCache service?

  4. Rob permalink

    Vista MCE is not a WPF app, so no.
    However, it is possible to run WPF XBAPs inside of MCE in Vista…so those apps would get a little benefit.
     
    MCE is a .Net application though, so the clr will already have been loaded…so for MCE + XBAP scenarios, I doubt the font cache service would have as much impact as normal Windows scenarios…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: