Bug 62496 - Memory leak when saving large ods file to xlsx format
Summary: Memory leak when saving large ods file to xlsx format
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) release
Hardware: x86-64 (AMD64) Linux (All)
: high major
Assignee: Not Assigned
Keywords: perf
Depends on:
Reported: 2013-03-18 22:03 UTC by Clemens Eisserer
Modified: 2018-01-29 10:35 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Clemens Eisserer 2013-03-18 22:03:37 UTC
1. When saving the very large spreadsheet at https://mega.co.nz/#!5d0j3b6A!chMGwxtsd3qKHPPkWKOrDlryAFtaZrI91dUiuQ3Jva4 to xsls-format, calc consumes about 3.8 GB of memory. When closing the document and working with an empty writer document, memory consumption only decreases to about 3GB.

2. Close the LibreOffice instance which was used for step 1. When opening the xsls-file generated in step 1 with a fresh libreoffice instance, calc consumes about 1.3GB of memory (which is ok). When saving the file again to xsls, memory consumtion grows to 6.8 GB. After closing the document and working a bit with writer, it stays at 5GB.

Beside the really huge memory consumption, the memory used for both steps should be freed. Instead, memory consumption only decreases slightly when closing the calc window which contains the large spreadsheet.
Comment 1 Clemens Eisserer 2013-03-18 23:27:47 UTC
Excel-2010 just needs 300mb of RAM after loading+saving the document generated by LibreOffice.
Comment 2 Joel Madero 2013-04-23 16:36:51 UTC
Markus - I'll test this one when I'm at home but I thought it might be a good test case for you (150 megs...pretty hefty file). Might have some cool stuff going on that can be used to track down performance issues.
Comment 3 Markus Mohrhard 2013-04-24 10:15:47 UTC
OK, I'll add it to my list. But mainly the memory consumption after closing Calc. That the current OOXML filters are not very efficient is known and has to wait for something like the orcus implementation.
Comment 4 Joel Madero 2013-06-02 06:18:05 UTC
Sorry for the delay - so I confirmed enough to mark this as NEW and confirm that it's a good test case to improve our filters.

IMO there are 2 problems that highlight everything else.

1. Opening the ODS itself takes up nearly 3 gigs - seems excessive for a 150 meg file

2. The memory is never freed up

because of point #2, I can't confirm the save to XLS as I only have 4 gigs of RAM and 1 gig of SWAP.

Markus - do you have a system with insane amount of RAM (8+ gigs?) to confirm behavior in point 1 & 2 about saving to xlsx - first time only being 1ish gigs but then after it just eating RAM alive?
Comment 5 Joel Madero 2015-05-02 15:43:17 UTC Comment hidden (obsolete)
Comment 6 Carlos Rodriguez 2015-06-21 11:55:27 UTC
After following the steps on Debian 8 (jessie) 64 bits I've got:

1.- I opened the spreadsheet and memory goes to almost 1GB
2.- When saving to xlsx memory went onto 1,9GB and when the process finished memory got to 1,4GB
3.- After closing the document memory went to 1,2GB.

Tested on:

Build ID: 9a0b23dd0ab9652e0965484934309f2d49a7758e
Locale: es-ES (es_ES.UTF-8)
Comment 7 Robinson Tryon (qubit) 2015-12-09 18:08:07 UTC
Migrating Whiteboard tags to Keywords: (perf)
Comment 8 Telesto 2017-06-13 18:08:35 UTC
The test file has been removed
Comment 9 Xisco Faulí 2017-06-19 09:27:52 UTC
Hi Clemens, Could you please upload the document again ?
Comment 10 QA Administrators 2018-01-02 10:14:53 UTC Comment hidden (obsolete)
Comment 11 QA Administrators 2018-01-29 10:35:54 UTC
Dear Bug Submitter,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team