Bug 58736 - FILEOPEN: Writer hangs with 50% CPU when open particular .RTF file
Summary: FILEOPEN: Writer hangs with 50% CPU when open particular .RTF file
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.0.beta2
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2012-12-25 06:52 UTC by Timon
Modified: 2015-01-26 15:10 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example document that hangs LibO (18.95 KB, application/x-zip)
2012-12-25 06:52 UTC, Timon
Details
gdbtrace.log (25.07 KB, text/plain)
2012-12-25 12:57 UTC, Werner
Details
3 bts at random after some point (5.80 KB, application/bzip2)
2012-12-27 06:04 UTC, Julien Nabet
Details
rtf file, that is opened 12 times slower in LibreOffice vs AOO (84.33 KB, application/x-zip-compressed)
2013-07-08 09:56 UTC, Timon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timon 2012-12-25 06:52:23 UTC
Created attachment 72096 [details]
Example document that hangs LibO

LibreOffice Version 4.0.0.0.beta2 (Build ID: 4104d660979c57e1160b5135634f732918460a0) on Russian Windows XP Professional SP3 (32bit) hangs with 50% CPU usage and permanent memory consumption (waited for more then 20 minutes).

MS Office 2003 Word; MS Office 2007 Word; Apache Open Office 3.4.1 Writer AOO 3.4.1m1 (Build: 9593) - Rev. 1372282  open this document successfully in a few seconds on Russian Windows XP Professional SP3 (32bit)

Files with small quantity of information (20 Kb) are opened in LibO successfully in adequate time (if you need, I can attach example of such a file).

Files with size from 1 to 5 Mb may hang LibO for several hours and never finish opening.
Comment 1 Werner 2012-12-25 12:57:33 UTC
Created attachment 72107 [details]
gdbtrace.log

Bug confirmed on linux, added backtrace.

It seems this bug is a duplicate of bug 52160.
Comment 2 Werner 2012-12-25 15:12:05 UTC
The backtrace was produced with an older debug build for Version 4.1.0.0.alpha0+ (Build ID: 92ccb9a9262d24087f95a8c2c6e0839cce6d9e1).

Different behaviour in Version 4.1.0.0.alpha0+ (Build ID: 0e08fed594c64eb827f051dbaaf9eb35e34db73) on Ubuntu 64 Bit: 

No crash, lo hangs after loading (writer window and status line (page 1/1, words: 3075) is shown), 100% cpu load on one core for several minutes.
Comment 3 Julien Nabet 2012-12-27 06:04:38 UTC
Created attachment 72163 [details]
3 bts at random after some point

On pc Debian x86-64 with master sources updated yesterday, I reproduced the hanging.
I retrieved 3 bts after progress bar seemed to stop progressing.
Comment 4 Timon 2013-02-26 06:04:33 UTC
In LibreOffice Version 4.0.1.1 (Build ID: 2c0c17a6e4bee0ee28131ea4bdc47edc700d659) on Russian Windows XP Professional SP3 (32bit) works for me, but times slower than in AOO 3.4.1m1 (Build: 9593) - Rev. 1372282.

If we try to open example file from attachement (Example 25 - could NOT be opened.rtf), then in:
- AOO it takes about 4 seconds to open;
- LibreOffice it takes about 7 seconds to open.

If we try to open rather big file (1.57 Mb with similar content), then in:
- AOO it takes about 20 seconds to open;
- LibreOffice it takes about 4 minutes and 45 seconds to open!

Sorry, I can't attach new big file, because it contains many confidential info and I have to spend too much time for patching it. But I think that some optimization can be done on example file (it could be opened 2 times faster).
Comment 5 Julien Nabet 2013-03-16 18:38:22 UTC
On pc Debian x86-64 with master sources updated today, I don't reproduce the hanging but it's quite long to open, about 30/45 secs(i5, 6GB)

Miklos: any idea about this one?
Comment 6 Timon 2013-07-08 09:56:30 UTC
Created attachment 82177 [details]
rtf file, that is opened 12 times slower in LibreOffice vs AOO

Desided to attach bigger file, because the problem is annoying enough and office staff is constantly complaining about it

On the same computer:
In AOO400m3(Build:9702) - Rev. 1499347 file is opened in about 25 seconds
In LibreOffice: 4.1.0.2.0 Build ID: 103a942746cfe346e87daab62acbd4268c38097 file is opened in about 5 minutes (about 12 times slower)
Bigger files could be opened by hours.
Comment 7 Jean-Baptiste Faure 2013-08-16 18:17:00 UTC
AOO 3.4.1 is not the ancestor of LO 4.0, so this bug can't be a regression from AOO. Changed summary accordingly.
Comment 8 Xisco Faulí 2014-04-04 12:54:34 UTC
I've just tested this issue with Libreoffice 4.2.2.1 Build ID: 3be8cda0bddd8e430d8cda1ebfd581265cca5a0f in Windows 7 Enterprise and there's already a great improvement compared with previous versions:

Example 25 - could NOT be opened -> 5 seconds
Example 25 - much bigger -> 1 minute and 39 seconds ( still can be improved ).

However, I found a performance regression between Libreoffice 4.2.2.1 Build ID: 3be8cda0bddd8e430d8cda1ebfd581265cca5a0f and 4.3.0.0.alpha0+
Build ID: b6a43bcbbf9e9a5655fd36fd4c8ef72d585f67b0

Example 25 - could NOT be opened -> 12 seconds
Example 25 - much bigger -> 2 minute and 40 seconds

For the time being, I mark this issue as regression. Please, let me know whether it's better to open a different case for this.
Comment 9 Timon 2014-04-11 05:54:19 UTC
May be your PC is much faster, but I just tested performance in Libreoffice 4.2.3.3 Build ID: 882f8a0a489bc99a9e60c7905a60226254cb6ff0 and compared it with previuos results in LibreOffice Version 4.0.1.1 Build ID: 2c0c17a6e4bee0ee28131ea4bdc47edc700d659 in Russian Windows XP Professional SP3 (32bit) - all is done on the same PC.

Apache Open Office Beta 4.1.0 AOO410m14(Build:9760) - Rev. 1573601
Example 25 - could NOT be opened -> 6 seconds
Example 25 - much bigger -> 22 seconds

LibreOffice Version 4.0.1.1
Example 25 - could NOT be opened -> 7 seconds
Example 25 - much bigger -> 4 minutes and 45 seconds

LibreOffice Version 4.2.3.3
Example 25 - could NOT be opened -> 7 seconds (no change)
Example 25 - much bigger -> 5 minutes and 07 seconds (slower than it was)

So I see even some small performance regression.
Comment 10 Matthew Francis 2014-12-29 15:11:39 UTC
Adding Whiteboard:bibisectRequest

Looks like it might be worth running this through the bibisect repositories to see where any major performance regressions have occurred
Comment 11 Matthew Francis 2015-01-26 15:10:45 UTC
The original issue reported on this bug, that attachment 72096 [details] fails to load, no longer occurs as of LO 4.3.5.1 and 4.4.0.2.

As only a single issue should be dealt with on a bug, I am closing this bug. A separate issue with the table border lines in attachment 72096 [details], and the slow speed of importing attachment 82177 [details] have been raised separately as bug 88811 and 88812 respectively.

-> RESOLVED WORKSFORME (as the specific commit which fixed the issue has not been identified)