dotnet / wpf

WPF is a .NET Core UI framework for building Windows desktop applications.
MIT License
7.03k stars 1.16k forks source link

PresentationFontCach.exe using large amount of CPU #8732

Open vsfeedback opened 7 months ago

vsfeedback commented 7 months ago

This issue has been moved from a ticket on Developer Community.


[severity:I'm unable to use this version] [regression] [worked-in:17.8.2] The Windows Presentation Foundation Font Cache 3.0.0.0 service (PresentationFontCache.exe) constantly is using a large portion of my CPU. Even when I reboot, it comes back. It happens when I am not even running Visual Studio. Please assist.


Original Comments

Feedback Bot on 1/23/2024, 09:28 PM:

(private comment, text removed)


Original Solutions

(no solutions)

miloush commented 7 months ago

That service is not related to Visual Studio. It can be disabled in Services.

lindexi commented 7 months ago

@miloush Can I know the dotnet core version of wpf will still use this PresentationFontCache Services?

miloush commented 7 months ago

@lindexi No. Since .NET Framework 4.0 switched from its own text rendering stack to DWrite, DWrite is in charge of the cache (that service is now called Windows Font Cache Service). The Windows Presentation Foundation Font Cache 3.0.0.0 service is only started when running WPF 3.5 app or earlier.

lindexi commented 7 months ago

So, disabling Windows Presentation Foundation Font Cache 3.0.0.0 service is safe for dotnet core versions of wpf applications.

miloush commented 7 months ago

Disabling the WPF cache service has always been safe as far as I remember, it would just have performance impact caused by, well, not having a font cache. By what the report is suggesting, such impact might be worth exchanging their current experience.