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

--- Comment #16 from Patrick Luby (volunteer) <guibomac...@gmail.com> ---
(In reply to Patrick Luby (volunteer) from comment #15)
> Before that patch, the code reused the same ScAccessibleCell instance for
> the 2K requests that we are seeing for each selected cell.

The 2K requests are coming from macOS. From what I see, macOS queries
accessible tables for a list of its accessible children. What's really
interesting is that macOS does this query 8 times in a row and each time we are
returning the same range of visible cells. So that causes a lot of duplicate
memory to be allocated in Calc.

An additional cause of the excessive memory usage appears to be that each
request is cached somewhere in Calc and so all previous requests are held in
memory and are not deleted until the document is closed.

So my next steps are to see if I can do either or both of following:

1. See if I can reduce the duplicate macOS requests for the range of visible
cells. Maybe macOS is trying to resolve the difference between the total number
of cells in the table (i.e. rows times columns) and the number of visible
cells.

2. When macOS releases the native object, somehow notify Calc to delete the
native object's ScAccessibleCell pointer.

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

Reply via email to