You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After doing some performance profiling, it looks like the bulk of the time spent during the draw loop is spent on drawing the grid. I.E. for every call to draw(), we are re-drawing the entire grid, then all spots in closedSet, then all spots in openSet.
Perhaps this can be optimized by only re-drawing the spots along the current path.
The text was updated successfully, but these errors were encountered:
I'm intending to pull all of the rendering code out into a MapRenderer class and I'll extend the caching idea more then. As this is meant to be about people understanding AStar and the algorithm implementation I wouldn't want to get too bogged down in optimising things like the draw though. It just needs to be fast enough. On my fairly average laptop and in Chrome it seems okay at the moment with the map render at around 10ms per loop according to the timing functions.
Ref: PR #4
After doing some performance profiling, it looks like the bulk of the time spent during the draw loop is spent on drawing the grid. I.E. for every call to draw(), we are re-drawing the entire grid, then all spots in closedSet, then all spots in openSet.
Perhaps this can be optimized by only re-drawing the spots along the current path.
The text was updated successfully, but these errors were encountered: