forked from amazingfate/loongoffice
Open the 300 pages bugdoc, paste a oneliner plain text content in a paragraph which is part of a numbered list, observe a 274 ms hang till layout is done for all pages, then we get an updated tile. We already do the layout in two passes: once for the visible area and then an idle pass for the rest of the pages. But we didn't notice that the LOK client has pending input events, so the list of events were like this: debug:20492:20486: SwTransferable::PasteData: finished in 5 ms debug:20492:20486: SwLayAction::InternalAction: finished in 273 ms debug:20492:20486: SwViewShell::PaintTile With this patch, the order of evens is rather like: debug:7541:7535: SwTransferable::PasteData: finished in 4 ms debug:7541:7535: SwViewShell::PaintTile debug:7541:7535: SwLayAction::InternalAction: finished in 261 ms Which means that once a LOK client opts in to provide an any input callback, the end-to-end time from the paste uno command dispatch to receiving the first tile update decreases from 963 ms to 14 ms. Change-Id: Ia9e734f84121b7d87150cb3479fc265ca8ee0292 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171885 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins