Switches from using .concat to assigning the value of the array by the index and adding to the length of the array before the loop
Swaps a .map in favor of a for loop.
Makes it so we don't create new functions inside this.build
I manually tested it works by walking around on a big map and running the profiler in Chrome. The profiler was run in the same spot with the same settings after page load.
Before:
After:
Additionally, I added a .prettierignore file because when I first saved, it created a really big formatting diff from prettier which would make it more difficult for you review.
I haven't really measured the impact of the second commit, but using for loops instead of .map is known to make stuff a little faster according to a bunch of blog posts with microbenchmarks that sound kind of unconvincing
This is a follow up from #96.
This code:
.concat
to assigning the value of the array by the index and adding to the length of the array before the loop.map
in favor of afor
loop.this.build
I manually tested it works by walking around on a big map and running the profiler in Chrome. The profiler was run in the same spot with the same settings after page load.
Before:
After:
Additionally, I added a
.prettierignore
file because when I first saved, it created a really big formatting diff from prettier which would make it more difficult for you review.I haven't really measured the impact of the second commit, but using for loops instead of
.map
is known to make stuff a little faster according to a bunch of blog posts with microbenchmarks that sound kind of unconvincing