include/svl/broadcast.hxx | 5 +++++ 1 file changed, 5 insertions(+) New commits: commit 03e8b5e08dcab5d29b360b769205977cd26bd41b Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Jun 6 11:25:07 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Jun 6 13:16:30 2022 +0200
add comments to SvtBroadcaster about field sizes/packing Change-Id: Ia01897ac1444e9ac905a0e383b892fa1478c2c33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135447 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/svl/broadcast.hxx b/include/svl/broadcast.hxx index 3c9f64967909..30592d22c6c7 100644 --- a/include/svl/broadcast.hxx +++ b/include/svl/broadcast.hxx @@ -82,6 +82,11 @@ private: /// When the broadcaster is about to die, collect listeners that asked for removal. mutable ListenersType maDestructedListeners; + /** + Note that this class is very performance sensitive, so the following fields have been + carefully sized and packed so we can access them quickly, while also taking as little CPU cache + space as possible (because e.g. calc can have a LOT of them) + */ 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;