Bug 123860 - High CPU usage and lag when scrolling past Noto Sans in the font list
Summary: High CPU usage and lag when scrolling past Noto Sans in the font list
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
6.2.0.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace, perf
Depends on:
Blocks: Performance Scrolling-Performance
  Show dependency treegraph
 
Reported: 2019-03-05 07:37 UTC by kmvan
Modified: 2022-04-20 08:51 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Perf flamegraph (273.08 KB, image/svg+xml)
2019-08-14 16:30 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kmvan 2019-03-05 07:37:29 UTC
Description:
Lag to scroll fonts list after many fonts (100+) installed. Maybe the `font-preview` causes it.

Steps to Reproduce:
1. Install many fonts (like Noto sans fonts...)
2. Open Writer and scroll font list to Noto Sans area.

Actual Results:
CPU usage high and UI lag.

Expected Results:
Normally CPU usage.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Comment 1 Xisco Faulí 2019-04-16 09:05:39 UTC
Could you please paste the info from Help - about LibreOffice ?

I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' once the information has been provided
Comment 2 kmvan 2019-04-16 09:13:01 UTC
(In reply to Xisco Faulí from comment #1)
> Could you please paste the info from Help - about LibreOffice ?
> 
> I have set the bug's status to 'NEEDINFO'. Please change it back to
> 'UNCONFIRMED' once the information has been provided

Sure.

Version: 6.2.2.2
Build ID: 6.2.2-2
CPU threads: 8; OS: Linux 5.0; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.utf8); UI-Language: en-US
Calc: threaded
Comment 3 Buovjaga 2019-08-14 16:30:00 UTC
Created attachment 153392 [details]
Perf flamegraph

It's true, Noto Sans chokes it somewhat. The lag/CPU hit is not as bad with kf5 backend.

Arch Linux 64-bit
Version: 6.4.0.0.alpha0+
Build ID: b9a776837462eeb6d50d0decc42604c0c3008eb1
CPU threads: 8; OS: Linux 5.2; UI render: default; VCL: gtk3; 
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 11 August 2019
Comment 4 Buovjaga 2022-04-20 08:51:24 UTC
fontconfig version 2.14 released on 2022-03-31 includes a huge performance boost related to this problem. The relevant code change is https://gitlab.freedesktop.org/fontconfig/fontconfig/-/commit/8022ab4aff469a8f095ce3168d879d3e0b3605ef

I have Arch Linux and they shipped the 2.14 version and the problem is now gone with gtk3 LibreOffice.