Skip to content

Reduce draw time by removing redundant moveEnd event#58

Open
michaelstorm wants to merge 1 commit intocambecc:masterfrom
michaelstorm:remove-redundant-moveend
Open

Reduce draw time by removing redundant moveEnd event#58
michaelstorm wants to merge 1 commit intocambecc:masterfrom
michaelstorm:remove-redundant-moveend

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