Open varkor opened 10 years ago
Preventing Battle from drawing achieves a much better framerate, although it does not eliminate the occasional spikes entirely (which is very frustrating). When sprites are actually drawn, though, the framerate oscillates between around 50 fps and 40 fps, over the course of a few seconds. This seems very dubious and I suspect there is some inefficient time-based code somewhere that has been overlooked. This is an important issue.
Weather effects are also a major factor in reducing the frame-rate.
The _ function seems to be somewhat responsible. At least when it is replaced with something else temporarily, although the usual, baseline performance issues remain, the sudden drop to a constant, much lower framerate (which is still very confusing—may be related to Chrome's "Optimized too many times" warning?), seems to disappear. Note that Firefox does not suffer from the sudden drop, just the constant baseline.
Especially in double battles, my computer struggled to achieve a constant 60 frames per second, although this should be easily attainable. I suspect it's something to do with a multitude of new Displays being created unnecessarily. Please investigate this.