https://bugs.documentfoundation.org/show_bug.cgi?id=156125

            Bug ID: 156125
           Summary: Slow scrolling of documents with many Math formulas
           Product: LibreOffice
           Version: 7.5.3.2 release
          Hardware: All
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: jrheinlaen...@users.sourceforge.net

Created attachment 188162
  --> https://bugs.documentfoundation.org/attachment.cgi?id=188162&action=edit
Writer file containing numerous Math objects with varying font sizes

When editing a Writer document that has many Math formulas, scrolling can
become irregular.
After examining this with callgrind, I found the reason in
vcl/unx/generic/fontmanager/fontconfig.cxx class CachedFontConfigFontOptions.
Here the font options cache is coded to a size of 10.

Apparently Math formulas can contain a lot of fonts in varying sizes. Thus the
font cache is quickly filled. On scrolling, an enormous amount of calls to
PrintFontManager::getFontOptions() is generated. Unless cached, these are
handled by libfontconfig's  FcFontSetMatch(). On typical Ubuntu systems,
several thousand fonts can be installed (run fc-list). Thus libfontconfig uses
a significant time to handle the calls.

Scrolling performance can be greatly improved by increasing the font options
cache size to e.g. 100. Since memory usage is probably not as critical as it
used to be when the font options cache was first implemented, that should be a
safe change.

Find attached a sample file with a lot of Math formulas containing different
font sizes.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to