[Libreoffice-bugs] [Bug 125428] Huge ram amount used not freed

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun May 24 13:44:40 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=125428

--- Comment #31 from Telesto <telesto at surfxs.nl> ---
(In reply to Noel Grandin from comment #30)
> @Telesto that particular commit is intended to _lower_ memory usage in most
> situations, by creating a shared pool of string objects to use, instead of
> every single cell and formula using it's own string object.
> 
> However, we never ever remove strings from that pool, so in this situation
> it leads to memory that this not freed until close.
> 
> We could flush that pool periodically, but it is not obvious when to flush
> that pool, in a way which will not cause performance regressions for some
> people.

I'm not knowing anything to give any advice here.. There are two flaws, IMHO
* The pool isn't flushed periodically
* The pool isn't flushed properly after closing the document either. It needs
some bizarre trigger to do so (like copying something to the clipboard)

Also no clue how a pool functions. Lacking the knowledge about smart pointers,
unique pointers etc.. Nor when unused strings can be useful.. Or how to track
unused and used strings.. just emptying a pool on timer doesn't sound smart.. 

I assume there are more strings stored than actually present in the visual
presentation in Calc itself. Is there no intelligent compiler feature to track
unused strings.. as a sort of garbage collector. To flush things out after
being unused for say 30 seconds.. 
Dumping everything into the pool until close, isn't doesn't sound like a proper
solution either.. However not sure if the pool gets filled because of the
specifics of the bug doc in question.. or this being a general behavior

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200524/da7fb3de/attachment.htm>


More information about the Libreoffice-bugs mailing list