When opening documents with multiple embedded fonts, the operation takes much time (at least on Windows), the more fonts are installed on system - the longer. To test, open attachment 117368 [details]. It contains multiple fonts, and its opening may take several minutes (>2 minutes on my system). The problem is repeated call to OutputDevice::ImplRefreshAllFontData, that ends each OutputDevice::AddTempDevFont. The call executes OutputDevice::ImplRefreshFontData for all windows in application. It may take several seconds (I see 6 s on my system) each. The proposal is to implement a way to avoid doing the expensive operations until all the fonts had been read. I see at least two ways to approach this: 1. Add a flag to ImplGetSVData()->maGDIData, that would tell OutputDevice::ImplRefreshAllFontData not to do anything; set in at the beginning of SaxExpatParser::parseStream (or another suitable function), and reset at the end (with refresh). 2. Reimplement the logic, so that invalidation would set a flag, and then any function that needs access to the data, would trigger the refresh and reset the flag.
Let's set to NEW.
A patch: https://gerrit.libreoffice.org/47112
bug 69060 comes to mind.. any relation?
(In reply to Telesto from comment #3) Definitely. (Though I don't address the "save" part, as I don't see it; and I don't see discussion of "save" part in that bug either.) I don't close this as duplicate, because I work on this, and if the patch would get accepted in its current form, it will reference this bug; but if I need to submit a new changeset, I'll change the bug # in the commit message, and close this as a dupe.
*** This bug has been marked as a duplicate of bug 69060 ***