You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When scrolling quickly through a large file with partial rendering on, the preview currently freezes and jumps back repeatedly as it tries to keep up with the scrolling.
The most basic implementations of a fix for this would be to either:
decouple the scrolling from the rendering (I don't know if this is possible/feasible in VS Code (you might need to spin up a whole extra process? dubiously worth it), but it would also fix the issue where you can't scroll when it's taking a long time to render)
just detect fast scrolling or hanging for a noticeable period of time while scrolling is trying to happen or whatever and abort the rendering until scrolling slows down
A more advanced implementation would combine the above with an augment to partial rendering with a fallback cached PDF/images, which isn't updated outside the current update scope of partial rendering but is displayed when scrolling quickly; then when scrolling slows down, overwriting it with an updated version.
The rudimentary version alone would be nice enough though.
The text was updated successfully, but these errors were encountered:
The debounce approach is undoubtedly a simplest solution but not quite perfect, since you don't get document content but white pages during scrolling.
But I have some thought about perfect solution. Since we have both incremental canvas and svg export, we could render document to svg inside of viewport and rest parts to canvas with low quality out of viewport.
With perfect solution, we could preview all document content during scrolling and restart svg rendering until scrollend event.
This also prepares for "typst-preview.renderMode": "canvas", which could be more lightweight but less interactable.
When scrolling quickly through a large file with partial rendering on, the preview currently freezes and jumps back repeatedly as it tries to keep up with the scrolling.
The most basic implementations of a fix for this would be to either:
A more advanced implementation would combine the above with an augment to partial rendering with a fallback cached PDF/images, which isn't updated outside the current update scope of partial rendering but is displayed when scrolling quickly; then when scrolling slows down, overwriting it with an updated version.
The rudimentary version alone would be nice enough though.
The text was updated successfully, but these errors were encountered: