Re-sizing window has very poor performance on large documents
Opened this issue · 1 comments
I noticed that window resizing has gotten very laggy compared to the v0.3 series when viewing very large documents (like src/manual_test_data/bun.md
)
slow_resize.mp4
I've gone ahead and recorded a profile with samply
while resizing the window constantly
https://share.firefox.dev/3SIORoT
From the flamegraph it's pretty clear that the problem lies somewhere in our font shaping. Chances are we just need to be caching something that we're recomputing every resize instead
Had some time to dig into this some more and it looks like the main slow-down comes from us supporting font-fallback now, so we're doing a lot more work now than we used to (since changing Shaping::Advanced
to Shaping::Basic
gets us back to snappy resizing). Looks like it's time to explore how we want to optimize this