diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-11-25 15:41:57 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-11-27 06:39:02 +0100 |
commit | 4edf078a77167d0fb5201f857146d95a901a809e (patch) | |
tree | bf576bfc57eb08e6dcddc96f30602167f41e845c /include/o3tl | |
parent | b918a7a7f5b0a868cd1c975cd0e6b3346c74ba3b (diff) |
tdf#108642 simplify comparison data calculation
Complex table-based writer doc with sidebar slow to open.
We are only using the extent data in SwAccessibleTableData_Impl as a
comparison method to see if that table structure has changed.
So just compare the rows and columns arrays instead of calculating
extents.
The downside is that we might fire events a little more often.
This takes the opening time from 17s to 10s for me.
Change-Id: I936cbc01072345d6360c0ec162de20b3111a588e
Reviewed-on: https://gerrit.libreoffice.org/83682
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/o3tl')
-rw-r--r-- | include/o3tl/sorted_vector.hxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/o3tl/sorted_vector.hxx b/include/o3tl/sorted_vector.hxx index 102287d52a21..088f5a2aa214 100644 --- a/include/o3tl/sorted_vector.hxx +++ b/include/o3tl/sorted_vector.hxx @@ -198,6 +198,16 @@ public: return (ret.second) ? ret.first : m_vector.end(); } + bool operator==(const sorted_vector & other) const + { + return m_vector == other.m_vector; + } + + bool operator!=(const sorted_vector & other) const + { + return m_vector != other.m_vector; + } + void insert(sorted_vector<Value,Compare,Find> const& rOther) { // optimization for the rather common case that we are overwriting this with the contents |