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

Patrick Luby (volunteer) <guibomac...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |noelgran...@gmail.com
            Summary|Calc leaks RAM when using   |Calc leaks RAM when using
                   |Smart Scroll with Logitech  |macOS accessibility
                   |Marble Mouse                |

--- Comment #13 from Patrick Luby (volunteer) <guibomac...@gmail.com> ---
(In reply to Patrick Luby (volunteer) from comment #12)
> Created attachment 194184 [details]
> Snapshot of Instruments application after clicking on dozens of empty Calc
> cells with VoiceOver enabled

So I profiled my LibreOffice local master build using the Instruments
applications and here is what I saw:

1. I didn't need Smart Scroll to reproduce the rapid increase in memory when
clicking on empty cells. Instead, enabling macOS' built-in VoiceOver feature
also triggered this behavior. Note: I have changed the title of this bug to
reflect that.

2. The rapidly increasing memory usage is due to Calc creating a special
accessibility object for each selected cell (i.e. an ScAccessibleCell).

3. Closing the Calc document frees all of the ScAccessibleCell cells.

Technically there isn't a leak since all this memory for ScAccessibleCells is
freed when you close the Calc document, but these ScAccessibleCell apparently
use a lot of memory. In attachment #194184, I had clicked on less than 50 cells
in an empty Calc document and that resulted in Calc holding 100 MB of
ScAccessibleCells.

Next step: see if we can reduce the memory load when using Calc with
accessibility enabled. Not sure what can be done, but I will walk through the
code and see if maybe some parts of ScAccessibleCells can be reclaimed
immediately after reuse.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to