implement caching slices of polygons
Opened this issue · 3 comments
meszaros-lajos-gyorgy commented
meszaros-lajos-gyorgy commented
The question is: how would the code know that this piece of map data's cached value needs to be invalidated? Two parts make up the caching here: the initial data and the instructions. We can assume that the original level data never changes, but how to store the intructions and compare them to a later version to see if they changed?
meszaros-lajos-gyorgy commented
createHashOfObject()
can help here from src/services/cache.ts
similarly to how EntitiyModel
caches FTL
files
meszaros-lajos-gyorgy commented
Maybe the transformation functions could create a diff similarly to how sequelize makes migrations. Storing information, like "load polygons from level11 and move them by 100/0/0" seems something that is more compact than storing the polygons themselves.