[Libreoffice-bugs] [Bug 114697] New: Optimize OutputDevice to only call ImplRefreshAllFontData once after reading all embedded fonts

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Dec 26 11:43:35 UTC 2017


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: libreoffice-bugs at lists.freedesktop.org
          Reporter: mikekaganski at hotmail.com

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20171226/c9bc5058/attachment.html>


More information about the Libreoffice-bugs mailing list