diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2016-09-27 05:08:51 +0200 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2016-09-27 05:26:02 +0200 |
commit | 3b64a198568d5b2bb14066581aca112cc6182fd7 (patch) | |
tree | 9f0c7dab5062a1de141d71f8186d47ff09e1e17d /sc/inc/dpobject.hxx | |
parent | 622bb4bc72ee6e8eae3193e80e13748be150e1e0 (diff) |
bnc#957991: Improve pivot cache reading performance
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.
Change-Id: Iaff55ffa3ed9c9b48cb18bd150eb4e1f7b617353
Diffstat (limited to 'sc/inc/dpobject.hxx')
-rw-r--r-- | sc/inc/dpobject.hxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx index 92ceff14fa0a..747bcfbac18c 100644 --- a/sc/inc/dpobject.hxx +++ b/sc/inc/dpobject.hxx @@ -365,6 +365,7 @@ public: sal_uLong ReloadCache(ScDPObject* pDPObj, std::set<ScDPObject*>& rRefs); bool ReloadGroupsInCache(ScDPObject* pDPObj, std::set<ScDPObject*>& rRefs); + bool GetReferenceGroups(const ScDPObject& rDPObj, const ScDPDimensionSaveData** pGroups) const; SC_DLLPUBLIC size_t GetCount() const; SC_DLLPUBLIC ScDPObject& operator[](size_t nIndex); @@ -389,6 +390,7 @@ public: void FreeTable(ScDPObject* pDPObj); SC_DLLPUBLIC bool InsertNewTable(ScDPObject* pDPObj); + bool HasTable(ScDPObject* pDPObj) const; SC_DLLPUBLIC SheetCaches& GetSheetCaches(); SC_DLLPUBLIC const SheetCaches& GetSheetCaches() const; |