We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello everyone! I am developing a simple Chess website and have gotten relatively far but for some reason, the 'Safari Web Content' is using over 100% of my CPU. It also makes my click events extremely delayed.
Specs:
CPU Usage:
Answers
how do we optimise code we cannot see?
the usual cause of this is just doing too much within the draw() loop. this runs (or tries to) 60 times a second, so even redrawing the entire chess board every time is probably going to result in high cpu. (maybe don't redraw the screen until something moves...)
but, like i say, without seeing the code we are just guessing.
http://p5js.org/reference/#/p5/noLoop
http://p5js.org/reference/#/p5/redraw