Bug 54550 - FILESAVE particular document takes long time with max CPU load
Summary: FILESAVE particular document takes long time with max CPU load
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) release
Hardware: Other Windows (All)
: medium normal
Assignee: Not Assigned
Whiteboard: BSA
Keywords: perf
Depends on:
Reported: 2012-09-05 12:05 UTC by Jhon H. Caicedo
Modified: 2015-12-15 11:06 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:

Test file in Excel 97-2003 format, it opens fine in LibreOffice Calc and Microsoft Excel 2010 (1.44 MB, application/vnd.ms-excel)
2012-09-05 12:05 UTC, Jhon H. Caicedo
Shorter File - Test (334.50 KB, application/vnd.ms-excel)
2012-10-26 19:00 UTC, Jhon H. Caicedo
Original file saved with Excel 2013 to .ods (201.55 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-05-24 08:04 UTC, Philipp Weissenbacher

Note You need to log in before you can comment on or make changes to this bug.
Description Jhon H. Caicedo 2012-09-05 12:05:54 UTC
Created attachment 66667 [details]
Test file in Excel 97-2003 format, it opens fine in LibreOffice Calc and Microsoft Excel 2010

Problem description: 

Steps to reproduce:
1. Open specific xls file on scalc
2. Use Save As function, and try to save as ods file.
3. ....

Current behavior:
- Application hangs after a few seconds (Not responding on window tittle), never finishes the saving, the ods file is not created.

Expected behavior:
- The file should be saved in ods format and a new file created.

Platform (if different from the browser): 
Windows 7 - 64bit              
Browser: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0
Comment 1 Rainer Bielefeld Retired 2012-10-26 12:10:41 UTC
[Reproducible] with  reporter's sample and with "LibreOffice” German UI/ German Locale [Build-ID: 58f22d5] on German WIN7 Home Premium (64bit) 
[Reproducible] with  reporter's sample and with  Server Installation of "LibreOffice German UI/Locale [Build-ID: dc9775d-05ecbee-0851ad3-1586698-727bf66] on German WIN7 Home Premium (64bit) 
[Reproducible]  with  reporter's sample and with Server Installation of "LibreOffice 3.3.3  German UI/Locale [OOO330m19 (Build:301) tag libreoffice-] on German WIN7 Home Premium (64bit)

Also reproducible with AOOo 3.4.0, so problem seems inherited from OOo
All versions need several minutes (app 10, 3.3.3 and AOOo were the fastest) with maximum processor load when I try to save the document as .ods

OOo3.1.1 does the job within 1 minute, OOo 2.0.2 even faster 

So it seems that the latest versions need the most time.

One characteristic of the document is that it uses lots of Styles, but I have on idea whether tat might be related.

@Spreadsheet Team
Please set Status to ASSIGNED and add yourself to "Assigned To" if you accept this Bug or forward the Bug if it's not your turf (and remove others in team from CC).
Comment 2 Rainer Bielefeld Retired 2012-10-26 14:14:07 UTC
Saving resulting .ods take long time (looks like hang) again, I doubt that that has to do with .xls
Comment 3 Rainer Bielefeld Retired 2012-10-26 14:32:18 UTC
@Jhon H. Caicedo
"Bug 56384 - Slow calculation and FILESAVE of spreadsheets with formatted cells", what do you think?
Comment 4 Jhon H. Caicedo 2012-10-26 19:00:42 UTC
Created attachment 69134 [details]
Shorter File - Test

Sample file, shorter (2 rows/10 columns)
Comment 5 Jhon H. Caicedo 2012-10-26 19:07:08 UTC
Added another sample file, basically took the first sample file and deleted most of columns/rows, left only 2 rows, 10 columns.

- Tested with LibreOffice (Build ID: da8c1e6)/Windows 7
- Cleared "direct formatting" on all cells.
- Same behavior, the file takes a long time to save in ods format.
- This file has a long list of styles, takes 8-10 seconds to open the Styles window list (F11)
- Saving the file in xls format using LibreOffice takes 3-4 seconds but works, issue is when saving to ods format.
- Another weird thing, text in cells D2/F2 shows blue, try clearing all format/change style but still shows blue.
Comment 6 Sandro Santilli 2012-10-27 10:07:59 UTC
I'm also having problems with incredibly slow save, but the most puzzling thing is that it is not always slow, even when just a few things change between save operations. So I suspect you couldn't immediately reproduce if i attach the file, nor I can trust testing saving to different format as it could be one of those times in which it saves fast. 

I don't know if it's related but adding a column is also very slow and CPU consuming. We're talking about _minutes_ here, for a 68K ods file (two sheets, many cells)
Comment 7 Jhon H. Caicedo 2012-12-06 22:36:53 UTC
Repeated test with Bug54550_Sample2.xls (Shorter File - Test attachment), running on LibreOffice (BuildID: 2ef5aff) still same behaviour, it never finishes saving the file in ods format, opening the styles window (F11) take 12-13 seconds.
Comment 8 Philipp Weissenbacher 2014-05-24 08:04:09 UTC
I can reproduce this in Calc, with the exception that is does not crash, but just takes a very long time to save.

I extracted the produced .ods file and the styles.xml file appears to be very large (~ 13 MB).

I loaded it in Excel 2013 and saved it to .ods; the syles file there is just 3 MB.
Comment 9 Philipp Weissenbacher 2014-05-24 08:04:52 UTC
Created attachment 99692 [details]
Original file saved with Excel 2013 to .ods
Comment 10 QA Administrators 2015-06-08 14:42:39 UTC
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

   Test to see if the bug is still present on a currently supported version of LibreOffice (4.4.3 or later)

   If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior
 If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System

Please DO NOT

   Update the version field
   Reply via email (please reply directly on the bug tracker)
   Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3)


2. Test your bug 
3. Leave a comment with your results;
4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 
4b. If the bug was not present in 3.3 - add "regression" to keyword

Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa

Thank you for your help!

-- The LibreOffice QA Team This NEW Message was generated on: 2015-06-08
Comment 11 Jhon H. Caicedo 2015-06-09 21:28:06 UTC
Repeated the tests with the sample files attached to this issue using a newer version of LibreOffice, the issue has been resolved, saving the files in ODS works correctly (and fast) for me.

OS: Windows 7 (x64)
LibreOffice Version:
Build ID: 88805f81e9fe61362df02b9941de8e38a9b5fd16

Setting status to RESOLVED - WORKSFORME
Comment 12 Robinson Tryon (qubit) 2015-12-15 11:06:32 UTC
Migrating Whiteboard tags to Keywords: (perf)