macabeus/klo-gba.js

Better experience when loading the tilemap

macabeus opened this issue · 1 comments

Currently, we have a very slowly and boring loading when select a vision to display the tilemap.
To load a tilemap is a very heavy task, because we need to create thousands of PointTile components, one for each tile at the map.

The first load takes ~3 seconds, and the second load takes ~13 seconds!! Probably because the cache miss at all PointTile elements)

We need to provide a better experience to the user. For example:

  • displaying a nice loading component
  • displaying the tilemap in parts
  • resolve the cache miss
  • optimize it (maybe creating less PointTile components following an algorithm?)

After many optimizations, I think that now I can close this issue.
Now the first load takes ~1.6 seconds and the second load takes ~2.8s.