Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-sizing window has very poor performance on large documents #229

Open
CosmicHorrorDev opened this issue Feb 3, 2024 · 1 comment
Open
Labels
C-bug Category: Something isn't working

Comments

@CosmicHorrorDev
Copy link
Collaborator

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

image

@CosmicHorrorDev CosmicHorrorDev added the C-bug Category: Something isn't working label Feb 3, 2024
@CosmicHorrorDev
Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant