MrNice/HR-Algorithms-Meetup — pull request #22 by SimpleAsCouldBe (2014-08-13 05:06:17+00:00)
Title: Improve draw performance for many points by using a canvas layer.

Hey man! I enjoyed this challenge, and thought folks might appreciate having the dots draw faster. It's really useful to be able to see them visually, but we were seeing draw times as slow at 14 seconds for 1000 points.

This PR uses a canvas layer to draw the hit/miss dots, and performance is now ~280ms for 10,000 points on my mac book air.

It assumes a fixed size graph. This was good enough for my needs but it would be easy enough to enhance so that the canvas layer always matches the graph size.