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

Debounce or otherwise improve mapToScreen #387

Closed
trvrb opened this issue Jul 11, 2017 · 0 comments · Fixed by #414
Closed

Debounce or otherwise improve mapToScreen #387

trvrb opened this issue Jul 11, 2017 · 0 comments · Fixed by #414
Assignees

Comments

@trvrb
Copy link
Member

trvrb commented Jul 11, 2017

The function mapToScreen updates x,y geometry for the tree. It's expensive. Unfortunately, we need to call it when updating visibilities (via date slider or otherwise) because changing branch thickness means we need to slightly adjust branches to avoid overlap.

Currently, this is a major bottleneck to animation speed. Each animation frame this has to be called. For current flu 3y region I'm getting a 75ms frame in which 20ms is mapToScreen. On these occasions it's not critical that mapToScreen be run every render cycle.

A simple fix should be to add a debounce. This has been called after visibility is changed and other things update. It can be disabled entirely during map animation I suspect. And run after animation paused.

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 a pull request may close this issue.

2 participants