Open caolanm opened 8 months ago
24.04 writer profile where we endured a slowdown after (possibly) selecting all text in 72 page and changing the font size.
Showing a cursor seems to have found some case where the notorious solveCrossovers gets called, odd
Showing a cursor seems to have found some case where the notorious solveCrossovers gets called, odd
That means that we have a selection overlay which (a) consists or more than one rectangle and (b) has a border, in which case we try and convert it into a "nicer" overlay polygon with a single continuous border.
Possibly we should just do what other software does and have multiple rectangles for that case, even if it means the borders don't look quite as nice.
Or maybe get alg to write us an optimised variant of that solveCrossovers() which only handles combining rectangles?
Or maybe get alg to write us an optimised variant of that solveCrossovers() which only handles combining rectangles?
Some interesting suggestions here, for such an algorithm: https://stackoverflow.com/questions/13746284/merging-multiple-adjacent-rectangles-into-one-polygon
The curious thing is that we split that polygon per-page; I wonder if by pushing that knowledge from up the stack down to here we could save trying to do 72 pages worth of pointless intersection, and just do that a page at a time (?) =) or perhaps we already do that (?)
No, it doesn't look like we pass down the selection as per-page information, it's just one big vector of rectangles.
Anyhow, WIP attempt at speeding this up at https://gerrit.libreoffice.org/c/core/+/165752
Today's typical small meeting document
As @pedropintosilva suggested I did a few screen recordings (more to come still) now also for 24.04 with some smoke testing for performance issues I've noticed that I'll just leave here as discussed with him. As I imagine the document used might be relevant, I used the ebooks from https://books.libreoffice.org/en/ as odt:
Note I'm also happy to file those individually if that makes more sense to you
Empty white pages shown for a long time, also the UI is only slowly changing its state
Following the previous loading scrolling down also takes a decent time to show the page content (might be related to the larger ToC), though this only happens once initially
writer-slow-page-scrolling.webm
writer-slow-toggle-formatting-marks.webm
I see that those tiles need to get rendered and transferred of course, just thought as a user this might cause the impression of performance issues, maybe some smart preloading of the next tiles could be done (or improved if already in place)
Might be interesting to work on this particular 600+ page book during testing to see if we can work out what is going on; I expect it is packed with large numbers of interesting features, charts etc. =)
Todays 24.04 writer session, while under extra bgsave load
Todays writer 24.04 session
Todays writer 24.04 session
today's writer 24.04 session with bgsaves merged together
today's scheduled call writer profile
todays regular call writer profile
todays regular call writer profile
todays regular call writer profile
todays regular writer profile, GetAccessibleDescription seems to be falling back to querying "local" help for HelpText which isn't even included (--without-help on those builds) so I can at the least make vcl conditionally not even bother if built without local help support
https://gerrit.libreoffice.org/c/core/+/168447 for that idea
todays writer call on staging-perf
Interesting to see so much time in lcl_DrawLineForWrongListData - I assume drawing wiggly underlined data is back in the profile at ~25% of rendering cost; oddly I thought we had a bitmap cache for that which massively accelerated this for spell checking @grandinj any idea if there is an extra path here, or perhaps the cache is too small and needs to scale with the # of differently sized and colored views (we were stressing that today I think)
Interesting to see so much time in lcl_DrawLineForWrongListData
The cache was added in commit 0759191e6923945469bc426b2c322ddeade12e09, and it 10 items big. The item key is { lineHeight, lineColor}.
Do you think you had more than 10 combinations of that? If so, we can just change that to cache size to 100 for the LOK case.
Quite probably we should size the cache based on the number of distinct views; I guess we want a comphelper/lok.hxx method that lets us know how many distinct views there are and (ultimately) get this to be what we call normalized views (ie. that share the same zoom/rendering attributes) - so that we don't over-enlarge the cache and have some sharing.
And then use that to do 5x the number of views or whatever (?) =) Would be grea tif you can look at that Noel !
24.04.4.3snapshot git hash: 8628721 Collabora Office 24.04.4.20240629 git hash: 2657979
24.04.4.2 git hash: 20b6b94a Collabora Office 24.04.4.2 git hash: 2d2c24d (confusingly this one is master I think and the above is 24.04 branch)
Hmm - the writer profiles has a lot of deltas in it - which looks unhealthy; I've also started to see the horror of full-document invalidations per-keystroke creeping back into collaborative editing sessions; it would be extremely good to have a desktop/source/lib/init.cxx lok_sample() type method that calls your watchdog trigger system-call on Linux, and that is used whenever a large area - or EMPTY invalidation is emitted - ideally from the core itself and not later from the CallbackFoo queue logic - so we can see where these come from =)
todays regular weekly meeting writer profile
todays collaborative session inserting images into writer
dysfunctional 24.04.5.2 writer document hang
Underwhelming experience with 24.04.4.5 grinding over bitmaps
Todays weekly scheduled cool meeting writer profile
collaborative writer testing
Today's writer profile
Todays staging writer profile
Still amusing to see PaintBorderAndShadow taking chunks of server time - when we have the data to render that better on the client side - and IIRC already do. I forget if we filed a perf ticket about that somewhere here =) Against that - it's nice to to have to worry about parallelizing document thumbnail saving as 50% of save-time anymore due to bgsave =) doc_setView is taking quite some time. I wonder if sorting by view - while injecting input events would help somewhat there.
Todays staging-perf writer profile
Today's staging-perf writer profile
Above is only a few minutes long before closed with "closeReason: documentconflict Szűcs Attila" and replaced with this longer session
A writer session pasting from mattermost where a UUIInteraction dialog requesting login/password for the remote graphic appears
Weekly COOL Meeting writer profile
Weekly COOL Meeting writer profile
uneventful writer perf-staging profile from todays meeting
Writer document, with a sample paste from mattermost causing the handleAuthenticationRequest dialog
https://github.com/CollaboraOnline/online/issues/9956 is related to this paste issue I think
Today's writer profile
Interesting profile; the ratio of RenderTiles in threads vs. in the main process is slightly suspicious - there is rather more going on there than we might expect perhaps ? =)
Todays writer collaborative session (paste was copy of entire bullet point document into its own footer so a fairly abnormal case)
Todays COOL meeting writer session
Today's writer profile from collab testing
Profile looks like a massive regression in rendering performance; I wonder if this is connected to the rendering / re-rendering problems we see with the 'Updates' metrics I mentioned to you.
The problem seems to be related to the relatively new anyInputCallback.
Writer 24.04 flamegraphs