Description: Memory usage after save increases with 37 MB since 6.2 and sticks around even after close of the document Steps to Reproduce: 1. Open attachment 160498 [details] and take notice of the memory usage of soffice.bin 2. Save the file and take notice off the memory usage of soffice.bin 3. Close the document and take notice off the memory usage of soffice.bin Actual Results: 6.1 origin/master Open 95 MB Save 217 MB Close 119 6.2 origin/master On open 153 After save save 255 On close 150 MB Expected Results: * Less memory usage on file open (if possible) * No bump in memory usage on file save (or only temporarily) * Memory should be cleared after close of the document Reproducible: Always User Profile Reset: No Additional Info: Found in Version: 7.1.0.0.alpha0+ (x64) Build ID: 83c4f86f22dc37269ac6a038fe7de053c42aad6e CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win Locale: nl-NL (nl_NL); UI: en-US Calc: CL
Created attachment 161590 [details] Bibisect log Bisected to author Miklos Vajna <vmiklos@collabora.co.uk> 2018-08-31 18:19:12 +0200 committer Miklos Vajna <vmiklos@collabora.co.uk> 2018-09-03 09:13:32 +0200 commit aeff83240c88435d11590f5e9c6fe9927a508c6a (patch) tree a3b918a7d3164ee428a4df39df7118a87618dfd9 parent 08b5048198d59441cb8033ed14cd17e68c943004 (diff) sw: save more vcl layout calls in SwFntObj This builds on top of commit 436b829f5b904d76039db0818cff5dedf1ae89f1 (sw: save one vcl layout call in SwFntObj::DrawText(), 2018-08-16), but now layouts are shared not only inside SwFntObj::DrawText(), but also between SwFntObj::GetTextSize() and SwFntObj::DrawText(). To get there, create an SwFntObj cache member that stores already calculated vcl layouts. SwFntObj already derives from SwCacheObj, so no need to explicitly expire this cache member. Total number of GenericSalLayout::LayoutText() invocations go down from 8 to 5 with this when pressing a key in Writer. https://cgit.freedesktop.org/libreoffice/core/commit/?id=aeff83240c88435d11590f5e9c6fe9927a508c6a
Discussed this briefly in #libreoffice-dev and consensus was to close as notabug