Bug 124801 - Writer cannot deal with huge files with long paragraphs ( see comment 7 )
Summary: Writer cannot deal with huge files with long paragraphs ( see comment 7 )
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace, perf
Depends on:
Blocks: Paragraph
  Show dependency treegraph
 
Reported: 2019-04-17 16:00 UTC by anzhe990206
Modified: 2019-06-17 14:48 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Document with laggy issue (14.80 KB, application/vnd.oasis.opendocument.text)
2019-04-17 16:16 UTC, anzhe990206
Details
Complex document with the laggy issue (30.18 KB, application/vnd.oasis.opendocument.text)
2019-04-18 05:11 UTC, anzhe990206
Details
Perf flamegraph (468.88 KB, image/svg+xml)
2019-04-24 19:01 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description anzhe990206 2019-04-17 16:00:49 UTC
Description:
Recently, I encountered the laggy and slowing down issue(You cannot goto somewhere smoothly or even edit or add some content smoothly) when using LibreOffice Writer to deal with a copied contents of an ebook.

And after I did some google search on this issue, many people experienced the same thing. And not a mature solution to solve this.

After doing some tests, I found that this issue may be caused by some long paragraphs.
If a document has one or more long paragraphs, LibreOffice Writer may not be able to handle it smoothly. (I make some long paragraphs(15000 characters per paragraph) and make an only 22-pages document, this issue which I have depicted occurred.)
And if I shortened the paragraph length, this issue disappeared even if I have a 200-pages long document.

In conclusion, I think your code probably needs to be changed to deal with long paragraphs. I believe this is why the laggy issue occurred.

Please solve this issue quickly, since some people may use some long paragraphs for a specific purpose, and I really appreciate your works and want to make it better!

I tested LibreOffice 6.1.
I think this issue is common in LibreOffice product.

Steps to Reproduce:
1. Make a long paragraph such as 15000-characters long.
2. Copy it, and repeat the same paragraph to make your document 20+ pages long.
3. You will not be able to go somewhere quickly and smoothly and even edit or add some contents to your document.

Actual Results:
You will not be able to go somewhere quickly and smoothly and even edit or add some contents to your document.

If your paragraph is longer, the issue will be more obvious.

Expected Results:
Make the paragraph shorter and the issue disappeared even your document is 200+ pages long.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.1.5.2
Build ID: 90f8dcf33c87b3705e78202e3df5142b201bd805
CPU threads: 2; OS: Linux 4.15; UI render: default; VCL: gtk2; 
Locale: zh-CN (zh_CN.UTF-8); Calc: group threaded

P.S
I think this issue is common in LibreOffice product.
Comment 1 anzhe990206 2019-04-17 16:16:35 UTC
Created attachment 150832 [details]
Document with laggy issue
Comment 2 V Stuart Foote 2019-04-18 04:41:37 UTC
Can not confirm on Windows 10 64-bit en-US (1803) with
Version: 6.2.3.1 (x64)
Build ID: 9ba025bafb03b962c34687cf87806cc03a3a7436
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded

Cursor movement is acceptably fast.

<PgDn> <PgUp> are immediate

<Ctrl>+G -- go to page dialog movement is instantaneous

<Ctrl><Home> & <Ctrl><End> are instantaneous


Quadrupled the paragraph length--<Ctrl>+End -> <Ctrl><Shift>+Home -> <Ctrl>+C copy -> <Ctrl>+End -> <Ctrl>+V paste -- and repeat.

Navigation by page, and to bookmarks/reminders dropped in text is immediate.


_Not_ seeing an issue.
Comment 3 anzhe990206 2019-04-18 05:06:08 UTC
Hello,

I also tested on win10 with LibreOffice Writer 6.2.2.2 (x64).

I didn't use the shortcuts, I just use the mouse to click the scroll bar to move the document. And you will find that it didn't work smoothly. And the mouse wheel will work acceptedly fine.

And if you add or change some contents in the center of the document, it won't respond quickly.
For example, you can click somewhere in the center of the document, and type random characters in it.

And I will upload another attachment called "Complex document with the laggy issue"(only one paragraph with 225,280 characters). You can test this one attachment because this issue will be more obvious.
Comment 4 anzhe990206 2019-04-18 05:11:59 UTC
Created attachment 150842 [details]
Complex document with the laggy issue

If you worry about malware, you can make it by yourself.

I just copied my comment and make all of them in a paragraph by deleting something. And copy-and-paste it repeatedly to make a long paragraph with 225,220 characters or more.

But please make sure all of your characters(225,220 characters or more) are in one paragraph. You can use Formatting Mark to see it.
Comment 5 anzhe990206 2019-04-18 05:19:43 UTC
(In reply to V Stuart Foote from comment #2)
> Can not confirm on Windows 10 64-bit en-US (1803) with
> Version: 6.2.3.1 (x64)
> Build ID: 9ba025bafb03b962c34687cf87806cc03a3a7436
> CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
> Locale: en-US (en_US); UI-Language: en-US
> Calc: threaded
> 
> Cursor movement is acceptably fast.
> 
> <PgDn> <PgUp> are immediate
> 
> <Ctrl>+G -- go to page dialog movement is instantaneous
> 
> <Ctrl><Home> & <Ctrl><End> are instantaneous
> 
> 
> Quadrupled the paragraph length--<Ctrl>+End -> <Ctrl><Shift>+Home ->
> <Ctrl>+C copy -> <Ctrl>+End -> <Ctrl>+V paste -- and repeat.
> 
> Navigation by page, and to bookmarks/reminders dropped in text is immediate.
> 
> 
> _Not_ seeing an issue.


Hello,

I also tested on win10 with LibreOffice Writer 6.2.2.2 (x64).

I didn't use the shortcuts, I just use the mouse to click the scroll bar to move the document. And you will find that it didn't work smoothly. And the mouse wheel will work acceptedly fine.

And if you add or change some contents in the center of the document, it won't respond quickly.
For example, you can click somewhere in the center of the document or select some lines(this may crash LibreOffice Writer), and type random characters in it.

And I will upload another attachment called "Complex document with the laggy issue"(only one paragraph with 225,280 characters). You can test this one attachment because this issue will be more obvious.
Comment 6 mulla.tasanim 2019-04-18 18:18:50 UTC
Thank you for reporting the bug.

I can confirm that the bug is present in

Version: 6.2.1.2 (x64)
Build ID: 7bcb35dc3024a62dea0caee87020152d1ee96e71
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: CL


Version: 6.3.0.0.alpha0+ (x64)
Build ID: 91cdf22b88a4f7bec243c8fb187627e766d3294c
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-03-08_00:38:10
Locale: en-US (en_US); UI-Language: en-US
Calc: CL

for 1st attachment-scrolling works fine,editing is sluggish
for 2nd attachment-scrolling and editing is sluggish
Comment 7 Buovjaga 2019-04-24 19:01:28 UTC
Created attachment 150985 [details]
Perf flamegraph

Dragging the scrollbar almost all the way down in attachment 150842 [details]

Arch Linux 64-bit
Version: 6.3.0.0.alpha0+
Build ID: cfbb223d5666cb803539ac98918ff39b27efc6e7
CPU threads: 8; OS: Linux 5.0; UI render: default; VCL: gtk3; 
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 24 April 2019
Comment 8 Xisco Faulí 2019-05-23 10:41:14 UTC
Also reproduced in


Version: 4.3.0.0.alpha1+
Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e