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

Use buffer prop to calculate when to redraw canvas #936

Merged
merged 2 commits into from
Jan 19, 2025

Conversation

LudvigHz
Copy link
Contributor

This is a rebased version of #913

Overview of PR

The README states that the canvas should redraw when there is 1/2 of the buffer left off-screen on
any side of the viewport. However, the code calculates the redraw based on 1/2 of the viewport and
not the buffer. This PR fixes this. This means that for buffers larger than the default, we
re-render way less often, providing for better performance with large timelines. As it is now, for
many tasks (~1000) the canvas continuously re-renders when scrolling, and the rendering cannot keep
up with scrolling, forcing the items to appear as they jump around a lot.

Previously, when to redraw was statically set to 0.5x the displayed
interval. Most likely this is a bug as it should redraw when only half
of the configured buffer size remains outside the viewport.
@Ilaiwi
Copy link
Collaborator

Ilaiwi commented Nov 17, 2024

@LudvigHz thank you, I am curious, did you get a chance to test out the new beta release with your app? have you seen any issues?

@Ilaiwi Ilaiwi merged commit 7d93cd1 into namespace-ee:master Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants