https://bugs.documentfoundation.org/show_bug.cgi?id=114697
Bug ID: 114697
Summary: Optimize OutputDevice to only call
ImplRefreshAllFontData once after reading all embedded
fonts
Product: LibreOffice
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: LibreOffice
Assignee: [email protected]
Reporter: [email protected]
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. 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.
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs