Ctrl+A and Data Sort took ages to broadcast ALL cells, fdo#81501 related
Noticed when investigating fdo#81501
Squashed commits:
Fix high memory usage when sorting cells in Calc. (fdo#81501)
Empty columns were being unnecessarily included in the sorting
range which caused extra allocation. This happens when you select
the entire sheet to sort. There was already code to skip empty
trailing cells in rows but not to skip empty columns.
Reviewed-on: https://gerrit.libreoffice.org/13294
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit c50d8bf596f527bb53b86dd04da652ed72f2c549)
actually use identical code for both byRow and byCol, fdo#81501 follow-up
(cherry picked from commit 1e4235f8b2dc693b0fb1edade9db25a631bdbf94)
trim also empty leading column ranges, fdo#81501 follow-up
(cherry picked from commit c7b57c6c2b15a4b9f65dafb642e3f1da402e62ca)
Ctrl+A and Data Sort took ages to broadcast ALL cells
... now that also empty cells are to be broadcasted.
Set dirty and broadcast only the effective data range as determined by Sort.
This is more a workaround, a cleaner solution would be to refactor the
SetDirty() algorithm to iterate only through broadcasters and use
AreaBroadcast() to notify area listeners.
However, this can also be easily backported to 4-3.
(cherry picked from commit 9a568c41ccd1ccf6073758973da5914a44f629d2)
982e03a12dd80be0787f22dce4495065775e7de0
eaeea85149e4b6d263b112205bb17c155e2d12be
6d68ca0088cec6a8328a3e93364ac928ef69babe
Change-Id: Ieac22647bb13165cbf66cb1a93f567e5169fff6a
Reviewed-on: https://gerrit.libreoffice.org/13324
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
5 files changed