Bug 161372 - Spreadsheets with comments are unreasonably slow
Summary: Spreadsheets with comments are unreasonably slow
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
24.2.3.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisectRequest, perf
Depends on:
Blocks: Calc-Comments
  Show dependency treegraph
 
Reported: 2024-06-01 07:55 UTC by jollytall
Modified: 2024-06-01 21:10 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
File with lots of comments to demonstrate speed problems (157.42 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-06-01 07:55 UTC, jollytall
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jollytall 2024-06-01 07:55:57 UTC
Created attachment 194506 [details]
File with lots of comments to demonstrate speed problems

I use lots of very large Calc files (20MB+) and the speed is reasonable. However, if the file has lots of comments, the program gets extremely slow even for very small files.

I attach a file about 160kB. It has two sheets, both 100x100 cells used. No formula, just plain text. The only difference is that the first sheet has no comments, while in the second every cell has one.
Now e.g. try to select columns A and B and right mouse Delete Columns. As there are no formulas, this should be a very simple operation. In the "nocomments" sheet it is instant as expected, while in the "comments" sheet it is about 2 minutes! Even closing the file takes more than 15 seconds without saving!

Although it is "just a performance issue", I find it a bug. It seems something is wrong/inefficient in the comment handling deep inside.

Remarks:
(I found some similar bugs (123417, 123418), but those are typically larger files. This is simple, still very slow.)
(Originally I generated the file with a third party tool and it was less than 100kB. However I do not want the error to be linked to that tool, so I opened the file and saved it with Calc itself - that is another question why the size then increased more than 60%?)
Comment 1 johnks 2024-06-01 10:26:48 UTC
confirmed. i got not responding multiple times and had to force quit

Version: 24.2.3.2 (X86_64) / LibreOffice Community
Build ID: 433d9c2ded56988e8a90e6b2e771ee4e6a5ab2ba
CPU threads: 4; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-IN (en_IN); UI: en-US
Calc: threaded
Comment 2 Buovjaga 2024-06-01 12:35:19 UTC
Probably this could be closed as a duplicate of bug 123419. The point is not about having a large file. See even bug 159222 comment 8. You can have very minimal repro steps.
Comment 3 Telesto 2024-06-01 21:00:07 UTC
(In reply to Buovjaga from comment #2)
> Probably this could be closed as a duplicate of bug 123419. The point is not
> about having a large file. See even bug 159222 comment 8. You can have very
> minimal repro steps.

The bugs mentioned don't fit, IMHO. This bug remind me quite a number of bugs I reported/bisected in the past regarding slow deletion of columns/rows. The bug likely introduced by likely Kohei. A number (all?) got fixed by Luboš Luňák. The might contain some clues how to fix this one too..

1. Open the attached file
2. Go to Comments tab
3. Select column A+B, right click -> delete columns

Found in
Version: 24.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: e3bd3c7e3178dc091fd002628f052666b4db3be6
CPU threads: 4; OS: Windows 8.1 X86_64 (6.3 build 9600); UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL threaded

and in
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

and in
Version: 5.1.0.0.alpha1+
Build ID: 49c2b9808df8a6b197dec666dfc0cda6321a4306
Threads 4; Ver: Windows 6.29; Render: GL

and in
4.4.7.2

and in
Versie: 4.2.0.4 
Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba7

fine with
Versie: 4.1.0.4 
Build ID: 89ea49ddacd9aa532507cbf852f2bb22b1ace28
Comment 4 Telesto 2024-06-01 21:10:14 UTC
Bug 113112 bug 133267 (and duplicates bug 125666 bug 126092)