Closed munwaikong closed 5 years ago
@munwaikong fantastic, thank you. I'll review today.
In terms of benchmarking, what I did was comparing the CPU, frames per second and timings reported in Chrome Dev Tools Performance tab.
Find some screenshots below:
Snapshot of original performance (without changes applied)
Snapshot of performance with changes applied
If you flip between the 2 images, you can see a lower CPU usage and the script times are slightly lower as well.
Awesome, thanks for sharing those :)
This PR contains a couple of renaming typos and variables as well as 2 minor tweaks for performance improvements:
1) Reduce the number of calls to
gl.getUniformLocation()
as per recommendation of mdn2) Reduce the number of calls to
clearTexture
every RAF if the state is the same as before.