bnc#957991: Improve pivot cache reading performance

Desktop / LibreOffice - Tamás Zolnai [collabora.com] - 26 September 2016 22:26 UTC

Performance problem was caused by grouping. Pivot tables with the same source are linked to each other by the pivot cache and so all the pivot tables were updated when one group was added to one of the tables.

This code change first of all fixes a functional issue: group name was wrongly imported and so pivot tables using group fields were broken. This caused by calling RefreshPivotTableGroups() on a pivot table which is not part of the cache yet and so update was not called on this table. Calling ReloadGroupTableData() solve this problem.

Second part of the codechange is about the consistency of the pivot cache. We have an invariant in this code to have the same groups for tabels with the same source. To keep this invariant we update every newly inserted tables adding the neccessary groups. The performance improvement here is that until the table is not part of the cache, it does not updates other tables. Group syncronization is done when the table is inserted to the ScDPCollection.

3b64a19 bnc#957991: Improve pivot cache reading performance
sc/inc/dpobject.hxx | 2 +
sc/source/core/data/dpobject.cxx | 74 ++++++++++++++++++++++++++++++++++++
sc/source/ui/docshell/dbdocfun.cxx | 54 ++++++++++++++++++--------
3 files changed, 114 insertions(+), 16 deletions(-)

Upstream: cgit.freedesktop.org


  • Share