diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2025-05-15 09:34:25 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2025-05-15 16:22:00 +0200 |
commit | e60a92164ac2cc35f70efcbf20a7272be1e3f99d (patch) | |
tree | 674d062ff9c24257142a8d7acee5b91062831fe4 /include/cppuhelper/interfacecontainer.h | |
parent | c3423850610b7fea7331647814e2719796fa088b (diff) |
cool#11942 svx lok: handle Writer idle status when starting the paint view idle
The bugdoc is similar to cool#11785, i.e. a document of 3-400 pages, but
the content is reasonably simple, mostly plain text and bullet points.
The document has a shape, though. Loading this document in COOL does a
full sync layout on load, which is reported to take ~9s on a slower
machine and it takes >1s for me locally (after doc load, before the
render of the first page).
It seems what happens is that idle layout is started, but it's not
interrupted, because moving content between pages in
SwLayAction::Action(), called from the SwLayIdle ctor calls into
SdrPaintView::Notify(), which starts a high priority "idle", so the LOK
client thinks it should not interrupt core jobs, so the idle layout
first completes, and only then we paint the first tile.
Fix the problem by adjusting the priority of
SdrPaintView::maComeBackIdle dynamically. Add a flag in the draw model
to know when we're inside the Writer idle layout and once the svx/ idle
is started, lower the priority in case that's invoked from inside the
Writer idle layout. This gives the LOK client a way to interrupt the
Writer idle layout (via the anyInput callback), now that it seems core
has no high priority jobs in the scheduler. Size of the time window
between the end of doc load and the start of the first tile render,
before: 1617 ms. After: 182 ms
An alternative approach I considered is to interact with the
SdrPaintView that belongs to the current Writer view, but that won't
work. There are typically 2 draw views active right after document
load, one created in SwViewShellImp::MakeDrawView(), but there is also
an additional hidden view created in the SvxDrawPage ctor for UNO
purposes, so if we don't go via SdrModel, we would have to notify both
views that we're entering / leaving the Writer idle layout, which looks
more complicated than what this patch does.
Change-Id: I115ba2c152fe7283804cde564afd511f9fbff707
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185360
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'include/cppuhelper/interfacecontainer.h')
0 files changed, 0 insertions, 0 deletions