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

Improve Memory Usage #62

Open
Goosius1 opened this issue Jul 3, 2023 · 0 comments
Open

Improve Memory Usage #62

Goosius1 opened this issue Jul 3, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@Goosius1
Copy link
Collaborator

Goosius1 commented Jul 3, 2023

  • The sitting memory usage of provinces is high
  • Improve it
  • How ?
    • Consider perhaps a lazy-loading scheme:
      • province coords are not loaded from disk until they are needed
      • that data is removed from memory when it is no longer needed
      • How could we do this?
      • A
        • We could divide the map into a 50x50 grid.
        • That would be about 2500 files
        • In each file we would save all the coords in that area
        • We could call these "mapSlices"
        • If a map slice is not needed for a while, it is removed from memory
        • If a map slice is needed, for example, if a player wants to found a town or claim, the right one is loaded from memory
        • When a map slice is loaded, it stays for a while, like a minute, then it de-loads.
@Goosius1 Goosius1 added the enhancement New feature or request label Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant