Bug 144515 - Perf: slow operation on a Calc cell with huge text
Summary: Perf: slow operation on a Calc cell with huge text
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.4.0
Keywords: perf
: 119362 120446 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-09-15 08:32 UTC by Mike Kaganski
Modified: 2022-04-12 20:17 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
A fixed-height wrapping cell with 140000 character string (49.39 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-09-15 08:32 UTC, Mike Kaganski
Details
perf flamegraph (70.71 KB, application/x-bzip)
2021-09-15 20:38 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2021-09-15 08:32:52 UTC
Created attachment 175028 [details]
A fixed-height wrapping cell with 140000 character string

The attachment contains a single cell with a long (140000 char) string; the cell is formatted to wrap, and the row is set to fixed height.

It takes long to open the file, or to select the cell. Possibly this could be optimized somehow?

It looks similar to tdf#144513, but seems to be different, not blocking at TextEngine::CreateLines. This time it spends time at ImpEditEngine::FormatDoc.
Comment 1 Julien Nabet 2021-09-15 20:38:22 UTC
Created attachment 175039 [details]
perf flamegraph

Here's a Flamegraph retrieved on pc Debian x86-64 with master sources updated today + gen rendering.
Comment 2 Julien Nabet 2021-09-15 20:38:39 UTC
I confirm it's slow indeed.
Comment 3 patrick rall 2021-09-19 18:59:53 UTC Comment hidden (spam)
Comment 4 Luboš Luňák 2022-04-08 09:50:47 UTC
*** Bug 119362 has been marked as a duplicate of this bug. ***
Comment 5 Luboš Luňák 2022-04-08 09:57:15 UTC
*** Bug 120446 has been marked as a duplicate of this bug. ***
Comment 6 Commit Notification 2022-04-12 20:17:19 UTC
Luboš Luňák committed a patch related to this issue.
It has been pushed to "master":

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

don't FormatDoc() a whole long text if not necessary (tdf#144515)

It will be available in 7.4.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.