https://bugs.winehq.org/show_bug.cgi?id=51371
Bug ID: 51371 Summary: Too many fonts slows down kernel32:heap! (caused by gdi32) Product: Wine Version: 6.10 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: gdi32 Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com Distribution: ---
In fact having too many fonts slows down the startup of any process that loads gdi32 (or user32), which is to say essentially every process.
This hits kernel32:heap quite hard because it starts many subprocesses for its tests. Here's a list of the worst hit tests:
Base Full set of fonts (see bug 51367) kernel32:heap <1s 13s comctl32:status <1s 13s reg.exe:add 3s 17s regedit.exe:regedit 14s 54s shell32:shlexec 13s 29s
But it's not just these tests being impacted, it's every one of the 720 test units, resulting in a full WineTest run taking an extra 9 minutes (on my box, more on the TestBot's debiant2).
The reason for the slowdown seems similar to the dwrite:font case (bug 51367) but on the gdi32 side. In particular each process issues quite a lot of these messages (OPENTYPE_PLATFORM_MAC case iirc) which may or may not be related:
0034:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.