diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-06-29 15:41:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-07-01 12:33:09 +0200 |
commit | 1b857954faf28fe4a63ee81686a5448766c213e7 (patch) | |
tree | cc55bc34713034d39c597fd75c1359b72b690064 /include | |
parent | b7a465c9403cf198df3424e9893c323b9d305026 (diff) |
tdf#132454 some more improvements
Defer moving around the vector by tagging the last bit in the pointer.
This takes the undo operation from 10s to 8s on my machine.
Also re-organise the fields a little to improve packing.
Also add some design notes
Change-Id: I38fa9156705c00bb9f64e2fc59ea862eba522942
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97424
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit bde0cc68bd6443c97b4ca061ed7132f478959281)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97571
Diffstat (limited to 'include')
-rw-r--r-- | include/svl/broadcast.hxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/svl/broadcast.hxx b/include/svl/broadcast.hxx index 6569775b68d4..69a7f4ad029e 100644 --- a/include/svl/broadcast.hxx +++ b/include/svl/broadcast.hxx @@ -80,13 +80,14 @@ private: /// When the broadcaster is about to die, collect listeners that asked for removal. mutable ListenersType maDestructedListeners; + mutable sal_Int32 mnEmptySlots; + // The first item in maListeners that is not sorted. The container can become large, so this optimizes sorting. + mutable sal_Int32 mnListenersFirstUnsorted; /// Indicate that this broadcaster will be destructed (we indicate this on all ScColumn's broadcasters during the ScTable destruction, eg.) bool mbAboutToDie:1; bool mbDisposing:1; // Whether maDestructedListeners is sorted or not. mutable bool mbDestNormalized:1; - // The first item in maListeners that is not sorted. The container can become large, so this optimizes sorting. - mutable size_t mnListenersFirstUnsorted; }; |