Bug 108353 - Inserting lots of rows to table burns CPU for some seconds if Automatic spell checking is enabled
Summary: Inserting lots of rows to table burns CPU for some seconds if Automatic spell...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.1.6.2 release
Hardware: All All
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: perf
Depends on:
Blocks: Spell-Checking Writer-Tables Performance CPU-AT-100%
  Show dependency treegraph
 
Reported: 2017-06-05 22:08 UTC by John Hutcheson
Modified: 2024-04-25 06:39 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screen shot of after 17hours (55.29 KB, image/png)
2017-06-05 22:08 UTC, John Hutcheson
Details
Example file to test inserting (8.61 KB, application/vnd.oasis.opendocument.text)
2017-11-21 09:34 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Hutcheson 2017-06-05 22:08:02 UTC
Created attachment 133868 [details]
Screen shot of after 17hours

How to reproduce.

Set page margins to 3mm
Create a table with 82 columns, 2 rows.
Set row height to 2.5mm.
Go to a cell in the second row, add 104 rows above it.
It takes hours create and render the table on the screen, And LibreOffice remains unresponsive for at least 17 hours, possibly indefinitely.
Comment 1 Xisco Faulí 2017-06-05 23:02:49 UTC
Thank you for reporting the bug.
it seems you're using an old version of LibreOffice.
Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version.
Comment 2 John Hutcheson 2017-06-07 10:02:52 UTC
Tried in 5.3.3.2.
Followed the procedure
on adding 104 rows LO 5.3.3.2 did this:
Created and drew the table on the screen almost immediately. Then hammered the CPU core for upto 90minutes before generating a segment fault.
Comment 3 Xisco Faulí 2017-11-15 10:38:38 UTC
Could you please check if this issue has been reported before?
Comment 4 John Hutcheson 2017-11-19 22:58:33 UTC
Pretty sure I searched for it when I reported it. I would not have reported as a new bug if that search did not come up empty.
Comment 5 John Hutcheson 2017-11-19 23:33:26 UTC
Just checked with the current Fresh 5.4.3. Created the table in about a second, still waiting for LO Writer to ungray.
Comment 6 Buovjaga 2017-11-21 09:34:14 UTC
Created attachment 137885 [details]
Example file to test inserting

The CPU burning is related to having Automatic spellchecking enabled (Tools menu).

In 6.0, the CPU burning is noticeable, but only lasts for a few seconds.

Test by going to Table - Insert - Rows and inserting the 104 before the 2nd row.

Arch Linux 64-bit
Version: 6.0.0.0.alpha1+
Build ID: 121303615054568c204def97872343d2014af4a0
CPU threads: 8; OS: Linux 4.13; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on November 17th 2017
Comment 7 John Hutcheson 2017-11-22 03:37:00 UTC
The amount of CPU Burning appears to be exponential in relation to the size of the table, Adding single rows with about 23 rows in the table results in about 6-7 minutes of CPU burning on this AMD Turion TL-60 with LO 5.1.6 under Ubuntu 16.04(32bit).
Comment 8 Telesto 2018-02-18 11:34:24 UTC Comment hidden (obsolete)
Comment 9 Buovjaga 2018-02-19 15:10:29 UTC
(In reply to Telesto from comment #8)
> No repro with
> Version: 6.1.0.0.alpha0+
> Build ID: b87fe45e8b087a315a65b92bf9c168b1e4c5cc00
> CPU threads: 4; OS: Windows 6.3; UI render: default; 
> TinderBox: Win-x86@42, Branch:master, Time: 2018-02-16_23:14:35
> Locale: nl-NL (nl_NL); Calc: CL
> 
> following the steps in comment 6

Inserting 104 rows still results in the same CPU use.

Arch Linux 64-bit
Version: 6.1.0.0.alpha0+
Build ID: c902cbc7dc5294ab721a9aef3a152aa243d00011
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on February 17th 2018
Comment 10 Telesto 2018-02-19 15:24:54 UTC
(In reply to Buovjaga from comment #9)
> Inserting 104 rows still results in the same CPU use.
> 
> Arch Linux 64-bit
> Version: 6.1.0.0.alpha0+
> Build ID: c902cbc7dc5294ab721a9aef3a152aa243d00011
> CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: kde4; 
> Locale: fi-FI (fi_FI.UTF-8); Calc: group
> Built on February 17th 2018

Ok, I see. So no "unresponsive for at least 17 hours" or something like that. Only a small bump ;-)
Comment 11 QA Administrators 2019-02-20 03:47:34 UTC Comment hidden (obsolete)
Comment 12 John Hutcheson 2019-02-20 06:55:33 UTC
Still a problem in 6.2.0.3-snap1.
Checked on Linux 4.15 with default VCL gtk3
Comment 13 John Hutcheson 2019-02-20 07:10:42 UTC
Addendum, the above re-test was with 64bit Ubuntu with an IronLake mobile cpu.
Comment 14 John Hutcheson 2019-02-20 07:11:55 UTC
still 16.04 fresh install.
Comment 15 John Hutcheson 2019-02-20 07:16:28 UTC
Still chugging away at it after 11mins.
Comment 16 Telesto 2020-09-07 07:40:12 UTC
It does seem pretty OK to me
Version: 7.1.0.0.alpha0+ (x64)
Build ID: e8b8e7be0b2ad693224cd94062a55610eb69df7e
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


Of course Skia backend.. no clue about GTK3/GEN/KDE
Comment 17 Buovjaga 2020-09-07 13:04:02 UTC
Yeah, it is only a very brief peak now.

Arch Linux 64-bit
Version: 7.1.0.0.alpha0+
Build ID: 4b7ee7bd61f78be60211cc72ba36da987191266e
CPU threads: 8; OS: Linux 5.8; UI render: default; VCL: kf5
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 7 September 2020