[Bug] pixi-tilemap.js memory leak check not working correctly

User: bblizzard
Bug: Memory leak check in pixi-tilemap implementation has a bug.
How to Replicate the Bug:
  • Play a map for 10 seconds or longer.
  • Using the profiler is likely to reveal a processing spike about every 10 seconds. Best replicated by using a weak CPU.
Other: In pixi-tilemap.js the bug is located in the function TileRenderer.prototype.getVb. The vertex buffer object's variable lastAccessTime is named incorrectly in that function. The correct name should be lastTimeAccess like in the rest of the TileRenderer class.
@Hackerham
Maybe this bug is somehow related to the one I've reported long ago with the 'Change Tileset' issue.
Possibly. This bug causes the cached vertex buffer to be discarded every 10 seconds since the wrong value is updated on access/usage of the vertex buffer. Changing tilesets might destroy those VBs even though it's not necessary while just an update of all data would be enough. This would explain the stutter. That being said, changing the tileset could be costly either way. So maybe they're just related, but not the same bug. Feel free to fix it manually (I explained how in my first post) for the time being and test it out again if you still experience stutter.
Possibly. This bug causes the cached vertex buffer to be discarded every 10 seconds since the wrong value is updated on access/usage of the vertex buffer. Changing tilesets might destroy those VBs even though it's not necessary while just an update of all data would be enough. This would explain the stutter. That being said, changing the tileset could be costly either way. So maybe they're just related, but not the same bug. Feel free to fix it manually (I explained how in my first post) for the time being and test it out again if you still experience stutter.
Well, it does not solve the Change Tileset issue, but it seems to work with the problem of this post, so it is a valuable fix for the time being until the devs fix it officially. Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/bug-pixi-tilemap-js-memory-leak-check-not-working-correctly.101081/