Bug 150623 - Switching between filled and empty sheets slow (sc::RowHeightContext)
Summary: Switching between filled and empty sheets slow (sc::RowHeightContext)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.4.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.8.0
Keywords: bibisected, bisected, perf
Depends on:
Blocks: Performance
  Show dependency treegraph
 
Reported: 2022-08-26 12:01 UTC by Telesto
Modified: 2025-03-27 08:17 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2022-08-26 12:01:16 UTC
Description:
Switching between sheets slow (sc::RowHeightContext)

Steps to Reproduce:
1. Open attachment 157561 [details]
2. Right click the sheet -> Add Sheet -> Add sheet to the right
3. Switch back & forward between tabs

Actual Results:
8 - 12 seconds lag

Expected Results:
Maybe 2 /3 seconds lag,


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 1c1647e6ee252fe68d7406d01043e88f1721590f
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: nl-NL
Calc: CL
Comment 1 Telesto 2022-08-26 12:03:22 UTC
Performance is better with
Version: 7.1.8.0.0+ (x64) / LibreOffice Community
Build ID: a94b58277c7aeaa83ce14347cd0b8f7137969d03
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 2 BogdanB 2022-08-26 13:34:08 UTC
Confirm with
Version: 7.4.0.2 (x64) / LibreOffice Community
Build ID: 1512ce97d7ed39dce3121f7e15651fd8895f950e
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: ro-RO (ro_RO); UI: en-US
Calc: threaded

Also in
Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 5ac75131556b687a01517ce4520a05bb49c1d840
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: ro-RO (ro_RO); UI: en-US
Calc: threaded
Comment 3 BogdanB 2023-09-23 13:23:29 UTC
I changed the earliest version according to comment 2.
Comment 4 BogdanB 2023-09-24 17:28:41 UTC
It's very hard to bibisect this. I am getting from 5,6-10,11 seconds, nothing relevant with 7.4. Couldn't be here used an automated bibisect with time and ./instdir/program/soffice and to use good or bad depending on seconds?

There are a lot of bugs to bibisect which have performance problems, and it's hard to detect the differences. I had 5 seconds, than 10 seconds. But maybe just happened.
Comment 5 Buovjaga 2025-03-17 09:59:12 UTC
Still laggy.

Arch Linux 64-bit
Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 493e37d16ce673560ab4309f91308cd5a99944d1
CPU threads: 8; OS: Linux 6.13; UI render: default; VCL: gtk3
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded
Built on 17 March 2025
Comment 6 Saburo 2025-03-18 11:13:04 UTC
For me, about 25 seconds to about a minute of bisecting.

commit 6080ba4d308b4b870bbbc5a7b4b960ce3ed2ecba
author	Noel Grandin

tdf#149647 LibreOffice Calc cursor not positioned correctly

Just to be sure
https://cgit.freedesktop.org/libreoffice/core/commit/?id=6080ba4d308b4b870bbbc5a7b4b960ce3ed2ecba
Comment 7 Buovjaga 2025-03-18 11:27:45 UTC
(In reply to Saburo from comment #6)
> For me, about 25 seconds to about a minute of bisecting.
> 
> commit 6080ba4d308b4b870bbbc5a7b4b960ce3ed2ecba
> author	Noel Grandin
> 
> tdf#149647 LibreOffice Calc cursor not positioned correctly
> 
> Just to be sure
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=6080ba4d308b4b870bbbc5a7b4b960ce3ed2ecba

Seems plausible.
Comment 8 Noel Grandin 2025-03-18 11:34:48 UTC
(In reply to Saburo from comment #6)
> For me, about 25 seconds to about a minute of bisecting.
> 
> commit 6080ba4d308b4b870bbbc5a7b4b960ce3ed2ecba
> author	Noel Grandin
> tdf#149647 LibreOffice Calc cursor not positioned correctly

Unfortunately, that is not very useful, because that is a revert of a performance commit.

So if you want to tag this as regression, then you'd need to go back to feec8e3c34e08b621098a17f1011dccd0b4f7f4c, measure the time, then work backwards from there to find where it got worse.

But likely it was bad already in feec8e3c34e08b621098a17f1011dccd0b4f7f4c and this isn't a regression, just another performance issue.
Comment 9 Commit Notification 2025-03-25 14:39:46 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4a555d35d92f72c8f3247abb1d3212bc06547c71

tdf#150623 speed up tab switch in calc

It will be available in 25.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2025-03-25 19:52:22 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0b18ae391fd87307cdbde21fa10f009cf4230585

tdf#150623 speed up switching tabs in complex calc doc

It will be available in 25.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2025-03-26 09:26:47 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/535c1f2561570b85c64eab846d6f95da6cf1ff64

tdf#150623 reduce load time of complex calc document

It will be available in 25.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Buovjaga 2025-03-26 10:33:26 UTC
With the commits, the switching lag is now only a slight one. Also, the opening time decreased from this in 25.2:

real    0m44,219s
user    0m43,862s
sys     0m0,755s

to this:
real    0m27,842s
user    0m27,661s
sys     0m0,586s

Arch Linux 64-bit
Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 535c1f2561570b85c64eab846d6f95da6cf1ff64
CPU threads: 8; OS: Linux 6.13; UI render: default; VCL: gtk3
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded
Built on 26 March 2025
Comment 13 Commit Notification 2025-03-27 08:17:37 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d4a314fcc66fade6c761cc7c7106336c1fd0e672

tdf#150623 reduce cost of ColorCfg

It will be available in 25.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.