Download it now!
Bug 39372 - Performance Issue with extra long single paragraphs
Summary: Performance Issue with extra long single paragraphs
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.2 release
Hardware: Other All
: low enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: perf
Depends on:
Blocks:
 
Reported: 2011-07-19 06:46 UTC by HarryT
Modified: 2015-12-15 11:05 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample document (23.15 KB, application/vnd.oasis.opendocument.text)
2011-07-20 02:42 UTC, Rainer Bielefeld Retired
Details
The attachment I tried to attach before (77.13 KB, application/vnd.oasis.opendocument.text)
2011-07-20 04:36 UTC, HarryT
Details

Note You need to log in before you can comment on or make changes to this bug.
Description HarryT 2011-07-19 06:46:12 UTC
This issue is in the code since years. So nothing new, but I found recently more info which makes it possible to give a description of the problem.

If you have a large text without any markup and you keep the backspace key pushed when somewhere in the middle of a document of about 24 pages (90 Kb), the processor gets busy for 100%. 

If you place a "end of page" marker in the text, the problem is gone.

Maybe I am wrong, but my conclusion is that LibreOffice tries to reformat all the text below the place where I push the backspace. This seems to be correct as long as there is no forced linefeed somewhere. But as soon as  I force LibreOffice to start on a new line, only a few lines behind where I push the backspace, I won't aspect LibreOffice to reformat all the text below that new line. So I don't understand why it takes so much processing power.

Off course this is not only with backspace but also insert or delete characters.

Is there any info on this issue? I hope my observation helps to solve this issue.
Comment 1 Caolán McNamara 2011-07-19 07:01:55 UTC
"If you have a large text without any markup and you keep the backspace key
pushed when somewhere in the middle of a document of about 24 pages (90 Kb),
the processor gets busy for 100%."

Is it a single hugely long paragraph, or multiple paragraphs ?, best to attach an example and stick a "HERE" or something at a position which reproduces it.
Comment 2 Rainer Bielefeld Retired 2011-07-19 23:43:30 UTC
NOT reproducible with a 25 pages WRITER text document (Lorem ipsum) and "LibreOffice 3.4.1  - WIN7  Home Premium (64bit) German UI [OOO340m1 (Build:103)]" 

@HarryT
This is not a valid bug report!
May I ask you to read  hints on <http://wiki.documentfoundation.org/BugReport> carefully?
Then please:
- Write a meaningful Summary
- Attach a sample document (not only screenshot)
- Attach screenshots with comments (you can add information using LibO DRAW
  and then attach your screenshot with comments as PDF) if necessary
- Contribute a step by step instruction containing every key press and every 
  mouse click how to reproduce your problem
- add information 
  -- what exactly is unexpected
  -- and why do you believe it's unexpected
  -- concerning your PC (video card ...)
  -- concerning your OS
  -- concerning your LibO version and localization (UI language)
  –- Libo settings that might be related to your problems 
    (video hardware acceleration ...)
  -- how you launch LibO and how you opened the sample document
  –- If you can contribute an OOo Issue that might be useful
  -- everything else crossing your mind after you read a.m. URL
Can you please file Bug reports with status UNCONFIRMED if your are not absolutely sure that you contributed all required background information and that the problem will be reproducible with information you can provide? 
Thank you!
Comment 3 HarryT 2011-07-20 01:15:09 UTC
The issues is reproduced on:
  Ubuntu 11.4 with Libreoffice 3.3.2  Intel 1,9 Ghz 750 Mb memory
  Windowsxp with Libreoffice 3.4  Intel dualcore 3 Ghz processor 1 Gb memory
  openSuse 11.04 with libreoffice 3.3.2 Amd 2.2 processor 1 Gb memory

Steps to find the issue:

Open the document. Go to the end of page 17 press the backspace button and keep it pressed down. If you not have a very fast PC, you will see a large delay after you pull your finger from the backspace button.

If you insert a page break before "Les IV" on page 19, the performance is much better.

I guess this is because LibreOffice is reformating the last part of the text, but I would aspect libreoffice stopping the reformating after "en Polo 1'39" on page 18 because there a new line starts. Only when this part moves to the previous line I see a reason to continue formating, but more relaxed as it is only necessary to move the lines up.
Comment 4 HarryT 2011-07-20 01:16:54 UTC
(In reply to comment #1)
> "If you have a large text without any markup and you keep the backspace key
> pushed when somewhere in the middle of a document of about 24 pages (90 Kb),
> the processor gets busy for 100%."
> 
> Is it a single hugely long paragraph, or multiple paragraphs ?, best to attach
> an example and stick a "HERE" or something at a position which reproduces it.

The issue is in a single long paragraph. I would never have typed it See this way, but this user did. See the comment and attachment I uloaded.
Comment 5 HarryT 2011-07-20 01:17:37 UTC
(In reply to comment #2)
> NOT reproducible with a 25 pages WRITER text document (Lorem ipsum) and
> "LibreOffice 3.4.1  - WIN7  Home Premium (64bit) German UI [OOO340m1
> (Build:103)]" 
> 
> @HarryT
> This is not a valid bug report!
> May I ask you to read  hints on <http://wiki.documentfoundation.org/BugReport>
> carefully?
> Then please:
> - Write a meaningful Summary
> - Attach a sample document (not only screenshot)
> - Attach screenshots with comments (you can add information using LibO DRAW
>   and then attach your screenshot with comments as PDF) if necessary
> - Contribute a step by step instruction containing every key press and every 
>   mouse click how to reproduce your problem
> - add information 
>   -- what exactly is unexpected
>   -- and why do you believe it's unexpected
>   -- concerning your PC (video card ...)
>   -- concerning your OS
>   -- concerning your LibO version and localization (UI language)
>   –- Libo settings that might be related to your problems 
>     (video hardware acceleration ...)
>   -- how you launch LibO and how you opened the sample document
>   –- If you can contribute an OOo Issue that might be useful
>   -- everything else crossing your mind after you read a.m. URL
> Can you please file Bug reports with status UNCONFIRMED if your are not
> absolutely sure that you contributed all required background information and
> that the problem will be reproducible with information you can provide? 
> Thank you!

I hope the additions I send in helps.
Comment 6 Caolán McNamara 2011-07-20 02:20:00 UTC
was there intended to be an attachment here ?, though I guess given that its the "incredibly long paragraph" problem I suspect it wouldn't be too hard to create a reproducer from scratch.
Comment 7 Rainer Bielefeld Retired 2011-07-20 02:42:14 UTC
Created attachment 49331 [details]
Sample document

With attached 2x 65000 characters paragraphs I can reproduce the problem with "LibreOffice 3.4.1  - WIN7  Home Premium (64bit) German UI [OOO340m1 (Build:103)]". I get significant CPU load and only app. 5 characters / sec deleted with Backspace and also Del. Both deletions work much faster in a document with "normal" paragraphs.
Comment 8 Don't use this account, use tml@iki.fi 2011-07-20 02:52:46 UTC
I would resolve this as NOTABUG. There will always be pathological documents for which LibreOffice is not a good tool. If somebody really needs to use documents with huge single paragraphs, he needs to use another application.
Comment 9 Caolán McNamara 2011-07-20 03:01:58 UTC
Well, either way its good to nail this down to the specific problem of over-long paragraphs as I suspected it might be.
Comment 10 Rainer Bielefeld Retired 2011-07-20 03:41:02 UTC
Might be interesting to know why big paragraphs cost CPU load, but a 6000 pages document allows deleting with normal speed and without significant CPU load.
But for the reported problem I also see a priority neaqrby 0.
Comment 11 HarryT 2011-07-20 04:36:05 UTC
Created attachment 49336 [details]
The attachment I tried to attach before
Comment 12 HarryT 2011-07-20 04:37:54 UTC
(In reply to comment #6)
> was there intended to be an attachment here ?, though I guess given that its
> the "incredibly long paragraph" problem I suspect it wouldn't be too hard to
> create a reproducer from scratch.

Yes I tried again to attach it.
Comment 13 Rainer Bielefeld Retired 2011-07-20 04:39:18 UTC
Reporter's sample confirms my results from Comment 7
Comment 14 HarryT 2011-07-20 05:27:57 UTC
(In reply to comment #10)
> Might be interesting to know why big paragraphs cost CPU load, but a 6000 pages
> document allows deleting with normal speed and without significant CPU load.
> But for the reported problem I also see a priority neaqrby 0.

If I may say something. Yes it is a strange way of typing. But most likely this user isn't the only who does this and turns away from libreoffice because of its speed. And I wouldn't be surprised if solving the issue, of why including a page break or a blank line after a new line makes so much differences, can speedup LibreOffice in general. This is an extreme example, but I guess it happens all the time by many users but less visible because of faster computers and/or smaller paragraphs.
Comment 15 Björn Michaelsen 2011-12-23 12:25:33 UTC
[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Comment 16 HarryT 2011-12-23 13:37:10 UTC
(In reply to comment #15)
> [This is an automated message.]
> This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
> started right out as NEW without ever being explicitly confirmed. The bug is
> changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
> to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2
> prereleases.
> Details on how to test the 3.5.0 beta1 can be found at:
> http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1
> 
> more detail on this bulk operation:
> http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html

Hi

I checked this and the bug is still present in Libreoffice 3.5.0 beta1.
I tested it on openSUSE 12.1 but doubt it will be different on other OS-es. 

{HT}
Comment 17 Rainer Bielefeld Retired 2012-03-01 07:19:34 UTC
<http://wiki.documentfoundation.org/BugReport_Details#Version>
Comment 18 bfoman (inactive) 2014-01-15 18:07:49 UTC
@HarryT: could you please recheck it with unstable LibreOffice 4.3 as it seems like 64kb paragraph limit is gone in this branch, so any perf issue could arise there also.
Master (currently 4.3 branch) builds are available at:
http://dev-builds.libreoffice.org/daily/master/
Comment 19 HarryT 2014-01-17 16:37:43 UTC
(In reply to comment #18)
> @HarryT: could you please recheck it with unstable LibreOffice 4.3 as it
> seems like 64kb paragraph limit is gone in this branch, so any perf issue
> could arise there also.
> Master (currently 4.3 branch) builds are available at:
> http://dev-builds.libreoffice.org/daily/master/

Hey, it is difficult to reproduce the exact problem as I don't have the same installations and hardware as at that time. But I could find the problem file in my archive.

My results:
- with openSUSE 13.1 and LibreOffice 4.1.3.2 the problem seems still to exist but less visuable as my hardware is much faster
- with MSWindows7 and LibreOffice 4.3 dd 17-1-2014 in a virtualbox on the same hardware as above, the problem seems to be gone.

My best guess is that the problem disappeared. At least 4.3 is more responsive. 

Hope this helps.






(In reply to comment #18)
> @HarryT: could you please recheck it with unstable LibreOffice 4.3 as it
> seems like 64kb paragraph limit is gone in this branch, so any perf issue
> could arise there also.
> Master (currently 4.3 branch) builds are available at:
> http://dev-builds.libreoffice.org/daily/master/
Comment 20 bfoman (inactive) 2014-01-17 17:05:48 UTC
Thanks. Marking as WORKSFORME as it is gone in master.
Comment 21 Robinson Tryon (qubit) 2015-12-15 11:05:09 UTC
Migrating Whiteboard tags to Keywords: (perf)
[NinjaEdit]