https://bugs.winehq.org/show_bug.cgi?id=56717
Bug ID: 56717 Summary: Clip Studio Paint 3.0 takes very long to load Product: Wine Version: 9.8 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: dwrite Assignee: wine-bugs@winehq.org Reporter: dark.shadow4@web.de Distribution: ---
The problem is that it calls IDWriteFactory_GetSystemFontCollection very often, and this is kinda expensive on Wine.
https://bugs.winehq.org/show_bug.cgi?id=56717
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://vd.clipstudio.net/c | |lipcontent/paint/app/302/CS | |P_302w_setup.exe Keywords| |download
https://bugs.winehq.org/show_bug.cgi?id=56717
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #1 from joaopa jeremielapuree@yahoo.fr --- Archived here https://web.archive.org/web/20240517212638/https://vd.clipstudio.net/clipcon...
https://bugs.winehq.org/show_bug.cgi?id=56717
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |performance
https://bugs.winehq.org/show_bug.cgi?id=56717
--- Comment #2 from Nikolay Sivov bunglehead@gmail.com --- According to my testing, returned collections are not automatically updated when fonts are installed or removed. Instead next call to GetSystemFontCollection() returns a new instance.
What we can do is to get rid of detach-on-release thing in collection_Release(), keep created collections as factory members, and check for last write time of the Fonts registry key that we use to fill the paths list. This should give close enough behavior.
Later to implement expiration events, we can add change notification handler for the same registry key, and signal all created system collections events (could be done lazily, only need to create events when GetExpirationEvent() is called).
https://bugs.winehq.org/show_bug.cgi?id=56717
--- Comment #3 from Fabian Maurer dark.shadow4@web.de --- Thanks for testing!
What about collections created using get_system_fontcollection? My last approach was handling those as they currently are, which means we have two different types of font collections - those that are owned by the factory and those that are not.
And then we have the problem that the returned object should be released, but the one owned by the factory should not. To keep the life cycle of the objects easier to understand, I introduced wrapper objects for the cached collections. Without those we'd need two ref counters / revive objects that already reached ref count 0 and that seemed worse... It still gets kinda ugly since we have that dualism, I don't think those wrapper objects are exactly pretty either.
I have a WIP implementation here: https://gitlab.winehq.org/DarkShadow44/wine/-/commits/font-cache
How do you suggest dealing with those issues?
https://bugs.winehq.org/show_bug.cgi?id=56717
--- Comment #4 from Fabian Maurer dark.shadow4@web.de ---
What about collections created using get_system_fontcollection?
Copy/Paste not working, I meant dwritefactory_CreateCustomFontCollection and other places that are not the system font collection.