FIX: Decreased performance when you load flow documents in a WPF application that targets the .NET Framework 4

Article translations Article translations
Article ID: 2652531 - View products that this article applies to.
Expand all | Collapse all

On This Page

SYMPTOMS

If you load flow documents in a Windows Presentation Foundation (WPF) application that targets the Microsoft .NET Framework 4, decreased performance occurs compared to in a WPF application that targets the Microsoft .NET Framework 3.5.

Note The issue typically occurs when you load flow documents that contain many glyphs from a font file.

CAUSE

This issue occurs because WPF relies on DirectWrite for processing flow documents. DirectWrite introduces a new behavior to mitigate problems when fonts are updated while an application is running. The new behavior causes relatively slow disk access when the last write time of the font file is being retrieved.

RESOLUTION

Hotfix information

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

This hotfix improves the performance of WPF applications by introducing a short-lived cache for last write times.

To resolve this problem, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft website:
http://support.microsoft.com/contactus/?ws=support
Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

You can also download this hotfix directly. To do this, visit the following Microsoft website:
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=28744

Prerequisites

To apply this hotfix, you must have the .NET Framework 4 installed.

Restart requirement

You must restart the computer after you apply this hotfix if the affected files are not being used. We recommend that you close all .NET Framework applications before you apply this hotfix.

File information

The global version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.

For all supported x86-based versions of Windows XP, of Windows Server 2003, of Windows Vista, of Windows Server 2008, and of Windows 7
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Presentationcore.dll4.0.30319.5403,792,16012-Dec-201108:13x86
Presentationframework.dll4.0.30319.5406,432,55212-Dec-201108:13x86
Setup.dll10.0.30319.540296,71212-Dec-201108:13x86
Setupengine.dll10.0.30319.540810,25612-Dec-201108:13x86
Setupui.exe10.0.30319.54079,11212-Dec-201108:13x86
Windowsbase.dll4.0.30319.5401,372,43212-Dec-201108:13x86

For all supported x64-based versions of Windows XP, of Windows Server 2003, of Windows Vista, of Windows Server 2008, of Windows 7, and of Windows Server 2008 R2
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Presentationcore.dll4.0.30319.5403,792,16012-Dec-201108:13x86
Presentationcore.dll4.0.30319.5403,827,48812-Dec-201108:50x64
Presentationframework.dll4.0.30319.5406,432,55212-Dec-201108:13x86
Setup.dll10.0.30319.540296,71212-Dec-201108:13x86
Setupengine.dll10.0.30319.540810,25612-Dec-201108:13x86
Setupui.exe10.0.30319.54079,11212-Dec-201108:13x86
Windowsbase.dll4.0.30319.5401,372,43212-Dec-201108:13x86

For all supported IA-64–based versions of Windows Server 2003, of Windows Server 2008, and of Windows Server 2008 R2
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Presentationcore.dll4.0.30319.5403,792,16012-Dec-201108:13x86
Presentationframework.dll4.0.30319.5406,432,55212-Dec-201108:13x86
Setup.dll10.0.30319.540296,71212-Dec-201108:13x86
Setupengine.dll10.0.30319.540810,25612-Dec-201108:13x86
Setupui.exe10.0.30319.54079,11212-Dec-201108:13x86
Windowsbase.dll4.0.30319.5401,372,43212-Dec-201108:13x86

MORE INFORMATION

When you run a WPF 4.0 application on a Windows XP-based computer, the application may experience an OutOfMemoryException exception. This occurs when the application loads a flow document that contains many glyphs from a font file. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

2588096 FIX: OutOfMemoryException occurs when you run a WPF application that loads a FlowDocument that has many glyphs on a Windows XP-based computer



REFERENCES

For more information about documents in WPF, visit the following MSDN website:
Documents in WPF
For more information about the FlowDocument class, visit the following MSDN website:
General information about FlowDocument class
For more information about the Glyphs.ToGlyphRun method, visit the following MSDN website:
General information about Glyphs.ToGlyphRun method

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Properties

Article ID: 2652531 - Last Review: January 26, 2012 - Revision: 2.0
APPLIES TO
  • Microsoft .NET Framework 4
Keywords: 
kbqfe kbhotfixserver kbfix kbexpertiseadvanced kbsurveynew KB2652531

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com