diff options
author | Mert Tumer <mert.tumer@collabora.com> | 2021-08-06 12:42:16 +0300 |
---|---|---|
committer | Mert Tumer <mert.tumer@collabora.com> | 2021-08-10 12:27:54 +0200 |
commit | 81055959e06848c917c4df1e4f19e1e5c6e70684 (patch) | |
tree | f7c5cdbbe69a21b30d3273696f5de1fedd49bff4 /sfx2/source | |
parent | 3bcfb1aac1f43f16c579486264103ebd4f3f829b (diff) |
lok: Avoid redundant call to UpdateConfigurations
We call doc_setView each time we send an event to LOK such as keystroke
and SidebarController::notifyContextChange event is triggered after that
UpdateConfigurations() call causes layout reallocating for whole sidebar
and we end up keep doing it. It takes significant amount of cpu time for
lok case for no reason.
Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I8f456156af841fdeaba1934498863a07a7d4554e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120112
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
(cherry picked from commit b606764ce2a042f2a38c98820d7236661149d20c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120138
Tested-by: Jenkins
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index b81080c546cd..fff93887c3a7 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -355,7 +355,8 @@ void SAL_CALL SidebarController::notifyContextChangeEvent (const css::ui::Contex // calling with held // solarmutex // TODO: this call is redundant but mandatory for unit test to update context on document loading - UpdateConfigurations(); + if (!comphelper::LibreOfficeKit::isActive()) + UpdateConfigurations(); } } |