Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement caching slices of polygons #7

Open
meszaros-lajos-gyorgy opened this issue Mar 20, 2024 · 3 comments
Open

implement caching slices of polygons #7

meszaros-lajos-gyorgy opened this issue Mar 20, 2024 · 3 comments

Comments

@meszaros-lajos-gyorgy
Copy link
Collaborator

loading a piece of an existing map when only a small portion of it is needed is quite wasteful and would be nice if it could be cached in the cache directory.

image

@meszaros-lajos-gyorgy meszaros-lajos-gyorgy self-assigned this Mar 20, 2024
@meszaros-lajos-gyorgy meszaros-lajos-gyorgy removed their assignment Apr 27, 2024
@meszaros-lajos-gyorgy
Copy link
Collaborator Author

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
Copy link
Collaborator Author

meszaros-lajos-gyorgy commented Oct 14, 2024

createHashOfObject() can help here from src/services/cache.ts similarly to how EntitiyModel caches FTL files

@meszaros-lajos-gyorgy
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant