diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-06-26 11:18:47 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-06-26 18:53:12 +0200 |
commit | 4d0ba0badeb5a83d8eb5373ba5d7ef931dcf62c9 (patch) | |
tree | 48b76f8384814aa7ccdcc7aecd634073d4bfdfc6 /include | |
parent | 68e7413b5f9ce4abd2a4e23bf27cfc335e52f03f (diff) |
reduce number of SvxTextEditSourceImpl listeners on SdrModel
when we have a lot of shapes, the number of listeners attached to
SdrModel becomes a serious bottleneck because of the number of
broadcast/notify function calls.
But SvxTextEditSourceImpl can just as well listen to the SdrObject,
which achieves the same end, and reduces the bottleneck on the SdrModel.
We do have to adjust some of the broadcast sites to broadcast the
event to the SdrObject listeners as well as the SdrModel listeners.
Possibly as another change we can remove the broadcasting to the
SdrModel listeners.
This shaves 10% off the load time of a large DOCX with lots of shapes.
Noting that we do no need to listen to SdrHintKind::ModelCleared because
we will get called via SvxTextEditSourceImpl::ObjectInDestruction when
the model is destroyed.
Change-Id: I3f7f6aa2a2146e4c4f59c974aa3fed92becf5eca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169565
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/svdobj.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx index 8dd17bdc00f5..f1bee52e87ec 100644 --- a/include/svx/svdobj.hxx +++ b/include/svx/svdobj.hxx @@ -409,7 +409,7 @@ public: void BroadcastObjectChange() const; - const SfxBroadcaster* GetBroadcaster() const; + SfxBroadcaster* GetBroadcaster() const; // set modified-flag in the model virtual void SetChanged(); |