NREL / floorspace.js

Other
66 stars 35 forks source link

refactor(geometry): add verticesMap #365

Open macintoshpie opened 4 years ago

macintoshpie commented 4 years ago

Partially addresses some performance issues by adding a hashmap of vertices to the geometry objects. Comparing this build to the current develop branch resulted in ~500ms improvement when drawing new spaces after loading the file from #348

This is not the ideal solution as it replicates state in the store (in geometry.vertices and geometry.verticesMap), but is a good first step with improved performance. The following step would be to consider refactoring geometry.vertices array into an array of id's

Changes/Additions