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

Reduce draw time by removing redundant moveEnd event #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

michaelstorm
Copy link

The moveEnd event was being triggered manually when the user stopped dragging the mouse, even though the event was triggered automatically when the new globe orientation was saved to the configuration. This caused the hi-res borders and lakes to be drawn twice. Removing the second event reduces draw time by ~115ms on my machine.

Removing the manual trigger exposed a race condition between drawing borders and interpolating the overlay, which perhaps was the original motivation for it. The fix for this is detailed in a code comment.

Great project, by the way! I'm looking into adapting it for some real-time-ish applications, so there might be some more performance-focused PRs from me.

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.

1 participant