Bug 159222 - Low performance with comments
Summary: Low performance with comments
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.1.8.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisectRequest, perf, regression
Depends on:
Blocks: Scrolling-Performance
  Show dependency treegraph
 
Reported: 2024-01-16 14:36 UTC by Heiko Tietze
Modified: 2024-01-18 10:14 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
hotspot flamegraph with gtk3 debug build (1.46 MB, image/svg+xml)
2024-01-18 10:14 UTC, Michael Weghorn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko Tietze 2024-01-16 14:36:46 UTC
Ctrl+down almost executes immediately but if I add a comment in A1 and go to bottom it takes around a second. With more comments it takes forever. 

Switching Comment Indicators and Col/Row Highlighting off has no effect, current v7.6.4 works nicely.

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 173b40944fa09825398ecd6f976f152ddd123257
CPU threads: 32; OS: Linux 6.7; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (en_US.UTF-8); UI: en-US
Calc: threaded

> more autogen.input
--with-system-libxml=no
--with-system-openssl
--with-system-curl
--enable-debug
--enable-kf5
--enable-qt6
--without-doxygen
--without-help
--without-myspell-dicts
Comment 1 Heiko Tietze 2024-01-16 15:15:53 UTC
Issue is way less eminent without debug info but still it takes a noticeable time (~500ms on a fast machine) with 10 comments. And it might be an issue with real data.
Comment 2 Xisco Faulí 2024-01-16 15:17:16 UTC
Steps to reproduce:
1. Open Calc
2. Insert a comment in a A1
3. Copy A1
4. Paste it in A1:A40
5. Select A1
6. Ctrl -
7. Ctrl + 

-> Hang
Comment 3 Xisco Faulí 2024-01-16 15:17:46 UTC
also reproduced in

Version: 7.3.0.0.alpha1+ / LibreOffice Community
Build ID: 229123ccc6f90ebf66b3e659bebbd53f8a9bdd3a
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: fr-FR (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 4 Xisco Faulí 2024-01-16 15:20:04 UTC
It's much slower with Gtk3 Than with gen so I believe accessibility might be involved
Comment 5 Heiko Tietze 2024-01-16 15:33:04 UTC
If the comment is on the end (not just the last row) it is as fast as without.
Comment 6 Telesto 2024-01-16 15:48:35 UTC
Also with
Version: 7.1.8.0.0+ (x64) / LibreOffice Community
Build ID: a94b58277c7aeaa83ce14347cd0b8f7137969d03
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL

fine with
Version: 7.0.7.0.0+ (x64)
Build ID: 626ea4e62a3e5005fe9825923a1c0c5bdb61cc08
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 7 Michael Weghorn 2024-01-18 10:14:00 UTC
Created attachment 192030 [details]
hotspot flamegraph with gtk3 debug build

(In reply to Xisco Faulí from comment #2)
> Steps to reproduce:
> 1. Open Calc
> 2. Insert a comment in a A1
> 3. Copy A1
> 4. Paste it in A1:A40
> 5. Select A1
> 6. Ctrl -
> 7. Ctrl + 
> 
> -> Hang

I've used steps 1-5 as described, then

6. Ctrl+Down

(Ctrl - bring up a dialog asking what to remove, doesn't hang for me).

(In reply to Xisco Faulí from comment #4)
> It's much slower with Gtk3 Than with gen so I believe accessibility might be
> involved

I see nothing that looks directly a11y-related in the attached hotspot flamegraph (taken with gtk3 debug build. I've waited more than a minute after step 6).

Most of the time seems to be spent calculating row heights (ScDocument::GetRowHeight).
It's similar in a flamegraph for kf5.

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 3e9a700091872480dd085f0928d1d30b7d74cfd7
CPU threads: 12; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-US (en_GB.UTF-8); UI: en-US
Calc: threaded