Description: MacOS: Memory isn't released to the initial state when closing a file after saving Steps to Reproduce: 1. Open attachment 144526 [details] 2. Press Save (very slow; lots of comments) 3. Close the document (back to start center) Actual Results: Some around 150-250 MB isn't released Expected Results: A bigger drop in memory usage when closing the file (back to start center). And way-off topic a better saving speed: every comment box seems to be rendered through Harfbuzz while saving (does it really have to?) Reproducible: Always User Profile Reset: No Additional Info: Version: 6.2.0.0.alpha0+ Build ID: 85818da3307a28b2d9c6fa5c1c97ca7833dfe24c CPU threads: 4; OS: Mac OS X 10.12.6; UI render: default; TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2018-08-22_04:15:46 Locale: nl-NL (nl_NL.UTF-8); Calc: threaded
Hmm, my experimentation so far just shows LO consuming more and more memory to the point where my system becomes unresponsive requiring a force kill of the LO process. I loaded LOdev master into Instruments.app and then followed memory allocations (until both LO and Insruments became unresponsive). Once the document is loaded, transient memory allocation is running at 10 Gb. I made a single digit change to one value without a comment in one cell, and then attempted a re-save. Instruments shows that memory allocation goes through the roof, passing from 10Gb transient to 85Gb transient memory, at which point my whole system becomes unresponsive. Both LO and Instruments grind to a halt. The memory guzzlers in this seem to be a combination of: - rtl_UString_new_WithLength : only 1.5kb each, but a gazillion of them - rtl_Ustring_ImplAlloc(int) : quite a few of these too at 416 bytes a throw This block is pointed to in strtmpl.cxx (1139-1157) IMPL_RTL_STRINGDATA* IMPL_RTL_STRINGNAME( ImplAlloc )( sal_Int32 nLen ) { IMPL_RTL_STRINGDATA * pData = (sal::static_int_cast< sal_uInt32 >(nLen) <= ((SAL_MAX_UINT32 - sizeof (IMPL_RTL_STRINGDATA)) / sizeof (IMPL_RTL_STRCODE))) ? static_cast<IMPL_RTL_STRINGDATA *>(rtl_allocateString( sizeof (IMPL_RTL_STRINGDATA) + nLen * sizeof (IMPL_RTL_STRCODE))) : nullptr; - I also see loads of calls to SfxItemSet::SfxItemSet(SfxItemSet const&), allegedly from itemset.cxx, but a search in itemset.cxx doesn't return any such line...
@Tor, I thought you could be interested in this issue...
About Telesto's initial description: What you describe isn't necessarily a bug. If the initial state is the Start Centre, it is very normal that after loading a document (for instance, a Writer one) and then closing that document, a lot of persistent data structures and code related to Writer functionality were constructed in and/or loaded into memory. Those don't go away even if you close the only Writer document open. What would be a problem is if for each time you open the same document (preferably a simple one that doesn't do any weird things like run BASIC macros etc) and close it, the memory consumption increases a lot. What Alex describes then sounds like a much more serious and different type of problem indeed.
Dear Telesto, 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 with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. 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) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 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: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
Version: 25.2.3.2 (AARCH64) / LibreOffice Community Build ID: bbb074479178df812d175f709636b368952c2ce3 CPU threads: 12; OS: macOS 15.4.1; UI render: Skia/Metal; VCL: osx Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded Open test file: Memory goes from ~500 to ~760 MB Press save: Memory goes to 1,1 GB Close document: Memory goes down to ~700 MB So the initial issue seems to be persisting. Re-opening the file: back to 1,1 GB Closing: back to ~700 MB Version: 25.8.0.0.alpha0+ (AARCH64) / LibreOffice Community Build ID: cb149972d5fc82f3ca8009c3e51931c8d94ee664 CPU threads: 12; OS: macOS 15.4.1; UI render: Skia/Metal; VCL: osx Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded Sits at ~700 MB when opened and idle. Open test file: Memory goes from ~700 to ~830 MB Press save: Memory goes to 1,1 GB Close document: Memory goes down to ~700 MB I am not sure what is expected here and if the ~700 MB memory after closing the file are acceptable or not. It is noticeable that nightly build sits at higher memory use after opening right away. The drop there goes back to the initial value. On the bright side, I don't see much lag in saving speed. It is taking 2-3 seconds. Either this is the improved Apple Silicon architecture or LibreOffice performance improved or a combination of both.
In light of comment 3, what comment 5 describes is normal and healthy behaviour, so let's close.