online icon indicating copy to clipboard operation
online copied to clipboard

generic writer performance ticket

Open caolanm opened this issue 1 year ago • 11 comments

placeholder to track weekly writer profiles

caolanm avatar Jan 18 '24 12:01 caolanm

@mmeeks @grandinj Seeing as I generally get a writer profile once a week, I'll stash it here regularly.

This weeks writer profile:

perf-677376

caolanm avatar Jan 18 '24 12:01 caolanm

Looks to me like we've got some galloping invalidation problem that is causing lots of tiles to be rendered un-necessarily. I would expect to see the event handling, spell-checking, editing of the document etc. to be a much larger proportion of the cost cf. a more normal profile like this from mid July: perf-23 05-writer

mmeeks avatar Jan 18 '24 18:01 mmeeks

perf-128281

About 20 minutes in writer. AsynchronousCall::Sync call seems to have emerged as a big cost. @vmiklos maybe https://gerrit.libreoffice.org/c/core/+/161952 is a problem there after all. Or @eszkadev had another theory related to sidebar appearing when it shouldn't

caolanm avatar Jan 25 '24 11:01 caolanm

This probably is regression from my recent commit, have fix for it: https://github.com/CollaboraOnline/online/pull/8092

eszkadev avatar Jan 25 '24 11:01 eszkadev

I hope that the above helps; setting the language/locale is meant to be cheap, so I would be a bit puzzled in case doing that would have performance impact. But I haven't measured.

vmiklos avatar Jan 25 '24 11:01 vmiklos

perf-107238

This weeks writer profile

caolanm avatar Feb 01 '24 11:02 caolanm

perf-179814

This weeks writer profile

caolanm avatar Feb 08 '24 11:02 caolanm

perf-294309

todays ad-hoc test, most longer document than usual (86 pages) heavy with images

caolanm avatar Feb 13 '24 12:02 caolanm

Hmm; I'm surprised to see the DrawBitmapEx doing that slowish clip/composite path; is there some rotation or other going on there? trace is a bit odd too, might be nice to have a sample doc with the image in it attached; I wonder if Armin has any ideas. Still lots of time in the PaintBaBo and PaintBorderAndShadow which seems to be doing something un-necessary with an alpha bitmap too =)

mmeeks avatar Feb 14 '24 17:02 mmeeks

perf-355691

todays writer profile

caolanm avatar Feb 15 '24 11:02 caolanm

Today's uneventful writer session

perf-527342

caolanm avatar Feb 22 '24 11:02 caolanm

Hopefully the ~8%+ of doc_setView cost is gone in 24.04 with the fix there (?)

mmeeks avatar Feb 27 '24 20:02 mmeeks

perf-132657

Todays writer flamegraph

caolanm avatar Feb 29 '24 11:02 caolanm

Ah hoc writer test

perf-219075

SwEditShell::GetWaterMark is a surprising new appearance there

caolanm avatar Mar 05 '24 12:03 caolanm

~18% of the time in GetWaterMark is indeed interesting; and it seems there is far too much invalidation & re-layout going on playing with the document.

mmeeks avatar Mar 05 '24 14:03 mmeeks

This weeks regular writer profile

perf-14543

caolanm avatar Mar 07 '24 12:03 caolanm

I'll put writer 24.04 flamegraphs at: https://github.com/CollaboraOnline/online/issues/8571

caolanm avatar Mar 19 '24 12:03 caolanm

Todays (23.05) writer profile

perf-81670

caolanm avatar Mar 21 '24 11:03 caolanm

That's quite encouragingly sensible; I guess - at least this looks plausibly like what I would expect us to do; clearly shrinking each piece is good but overall it looks balanced enough ? =)

mmeeks avatar Mar 21 '24 14:03 mmeeks

Nothing terrible, but it was a simple session. Maybe ApplyViewOptions is a little suspicious, and presumably the xor stuff under that is from a blinking cursor which is presumably the kind of thing that doesn't need to happen in kit-mode.

caolanm avatar Mar 21 '24 15:03 caolanm

perf-579991

fairly unremarkable 23.05 writer session perf-wise I think

caolanm avatar Mar 28 '24 12:03 caolanm