Bug 113067 - undo/delete consumes much cpu power and is slow in large documents
Summary: undo/delete consumes much cpu power and is slow in large documents
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: perf
Depends on:
Blocks: Track-Changes Performance CPU-AT-100%
  Show dependency treegraph
 
Reported: 2017-10-12 13:59 UTC by Charles
Modified: 2024-04-25 06:39 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Testdocument (22.74 KB, application/vnd.oasis.opendocument.text)
2017-10-12 16:37 UTC, Charles
Details
I made a video of my 4 CPU working hard in deleting some letters on 6.2 (8.11 MB, video/mp4)
2018-08-20 08:51 UTC, BogdanB
Details
I created a new file with just the text "test". 35 pages... This is the file I tested it. (27.66 KB, application/vnd.oasis.opendocument.text)
2018-08-20 08:51 UTC, BogdanB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Charles 2017-10-12 13:59:10 UTC
If I delete a long word with the backspace key, the cpu rises up du 13% and the green "progress bar" down in the status line is visible for a secound or so. The process is slow (much slower than tiping the same amount of letters). The document is around 60 pages but with a lot of formulas (~200). Is this a known "problem"? Tested with 5.4.2.2 and 5.3.6.1

Thank you very much for your work on this great piece of software!
Comment 1 Telesto 2017-10-12 15:34:59 UTC
Thank you for reporting the bug. You're probably on to something (I did a quick test with quite different document). Please attach a sample document. So I can check if it's the same bug.

I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)
Comment 2 Charles 2017-10-12 16:37:28 UTC
Created attachment 136936 [details]
Testdocument

Hi, thank you for your fast answer! 

I have an idea of the "bug": It is due to the "change log". If the changes are visible, everything is very fast and responsive - works like a charm. But if the changes are hidden (while recording the changes), the deletion of a letter is slow and costs "a lot" of CPU power...

Sorry, I didn't know, that I was recording the changes and it tooks me 2 hours to reproduce the problem with a fresh document... But here it is...

Thank you all for your phenomenal work on LibreOffice!
Comment 3 Mohamed 2017-10-13 06:16:16 UTC
I used the attached document. That’s right when using back space to delete or undo button the CPU utilization jump from 2 % to 30 % and more. Even I tried to reproduce the issue with two other different files, I got the same situation.

Test environment :
    • Operating system : Windows 8.1 Pro 64-bits.
    • LibreOffice : Version: 5.4.2.2
		Build ID: 22b09f6418e8c2d508a9eaf86b2399209b0990f4
		CPU threads: 4; OS: Windows 6.2; UI render: default; 
		Locale: en-US (en_US); Calc: group
Comment 4 Buovjaga 2017-11-04 19:10:35 UTC
NEW per comment 3.
Comment 5 Telesto 2017-11-06 10:53:13 UTC
Repro with
Version: 6.0.0.0.alpha1+
Build ID: b3f1d199a72ce87cb65ddaeac922564f57da6a4d
CPU threads: 4; OS: Windows 6.3; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-11-06_00:10:53
Locale: nl-NL (nl_NL); Calc: CL

and with
Versie 4.0.0.3 (Bouw-id: 7545bee9c2a0782548772a21bc84a9dcc583b89)

No repro without tracking changes enabled/recording

Probably a dupe
Comment 6 Charles 2017-11-06 19:44:28 UTC
(In reply to Telesto from comment #5)
> Repro with
> Version: 6.0.0.0.alpha1+
> Build ID: b3f1d199a72ce87cb65ddaeac922564f57da6a4d
> CPU threads: 4; OS: Windows 6.3; UI render: default; 
> TinderBox: Win-x86@42, Branch:master, Time: 2017-11-06_00:10:53
> Locale: nl-NL (nl_NL); Calc: CL
> 
> and with
> Versie 4.0.0.3 (Bouw-id: 7545bee9c2a0782548772a21bc84a9dcc583b89)
> 
> No repro without tracking changes enabled/recording
> 
> Probably a dupe

Hi,
what's a dupe?
Comment 7 BogdanB 2018-08-20 08:51:10 UTC
Created attachment 144321 [details]
I made a video of my 4 CPU working hard in deleting some letters on 6.2

Version: 6.2.0.0.alpha0+
Build ID: f05b0a6aaf8af5d78f9cad8bb953228cb0ce09f1
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2018-08-20_01:57:14
Locale: ro-RO (ro_RO.UTF-8); Calc: threaded
Comment 8 BogdanB 2018-08-20 08:51:56 UTC
Created attachment 144322 [details]
I created a new file with just the text "test". 35 pages... This is the file I tested it.
Comment 9 QA Administrators 2019-09-02 09:21:43 UTC Comment hidden (obsolete)
Comment 10 Telesto 2019-12-27 18:05:06 UTC
Repro with
Version: 6.5.0.0.alpha0+ (x64)
Build ID: 42a1a1c6b91907f81e15066ffab219411f18c4db
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win; 
Locale: nl-NL (nl_NL); UI-Language: en-US
Calc: CL
Comment 11 QA Administrators 2021-12-27 04:06:19 UTC Comment hidden (obsolete)
Comment 12 QA Administrators 2023-12-28 03:11:05 UTC Comment hidden (obsolete)
Comment 13 Tex2002ans 2024-02-09 18:42:31 UTC
Opening + testing Comment #8's document, I pretty much got the same exact symptoms as Comment #7's video using:

Version: 24.2.0.3 (X86_64) / LibreOffice Community
Build ID: da48488a73ddd66ea24cf16bbc4f7b9c08e9bea1
CPU threads: 8; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

- - -

0. Open attachment 144322 [details].
1. Click at the end of a line.
2. Hold down BACKSPACE.

And you could see LO chugging/stuttering.

I also tested:

- Holding down the DELETE key.
   - Same exact symptoms.

- - -

Comparing between a few different programs...

Deleting one whole line of text with backspace:

~11 seconds = LibreOffice 24.2
~3 seconds = Word 365 (Version 2401, Build 17231.20194)
~3 seconds = Notepad++ v.8.6.2

In LibreOffice, it was:

- stuttering/jerking around.
   - Some characters deleted fast, others stalled/slow.

In Word/Notepad++, there was:

- absolutely 0 slowdown.

It seemed to delete that amount of text at the same exact speed whether it was in a really short paragraph or the super long/"slow" one.