Open Bug 1680153 Opened 1 year ago Updated 8 months ago

Scrolling is janky with the pages per sheet option

Categories

(Core :: Print Preview, defect)

defect

Tracking

()

People

(Reporter: mstriemer, Unassigned)

Details

(Keywords: perf, Whiteboard: [print2020])

When using the pages per sheet option scrolling the preview becomes pretty janky. Attached is a profile [1] that opens the Firefox Wikipedia page's print dialog, scrolls, then sets pages per sheet to 16 and scrolls again.

[1] https://share.firefox.dev/3lp51Qh

Note: pages-per-sheet will probably be available in Nightly tomorrow, behind the off-by-default pref print.pages_per_sheet.enabled (added in bug 1673713).

In Mark's profile from comment 0, it looks like the scroll jank is coming from some long-duration paint operations (which are mostly in the 40-50ms range). Here's a profile-snippet showing a few of these slow operations: https://share.firefox.dev/36tDHMQ

I suspect the issue here is effectively that we're just painting a lot of content (16 viewports' worth, basically). I also have a faint memory that there are some scrolling/painting optimizations that we don't have enabled for print preview, though maybe I'm misremembering on that -- CC'ing some other folks who might remember.

Yeah - it doesn't seem bad to me, given the amount of content we're painting, though of course anything we can do to make it smoother/faster would be good.

TBH I'm surprised it works as well as it does, with 16 pages of dense content per sheet. (I can imagine it could be quite janky on a slower machine, though.)

Severity: -- → S3
Keywords: perf
Whiteboard: [print2020_v85] → [print2020_v88]
Whiteboard: [print2020_v88] → [print2020]
You need to log in before you can comment on or make changes to this bug.