Skip to content

Saving and loading game takes too long #42

@DavidFidge

Description

@DavidFidge

#41 fixed load game prompt speed. However actually performing a save game and load game is slow.

Most of the current problems are in the Monsters where it must serialize a large list of seen tiles. This means it will get worse as more levels are added to the game.

Writing a custom serializer for serializing map-related data such as map tile information, monster seen tiles etc should help:
https://www.newtonsoft.com/json/help/html/Performance.htm

Another thing to try would be to use BSON which would mean ints etc won't have to be converted to strings, though I doubt this is where the performance problems are:
https://www.newtonsoft.com/json/help/html/SerializeToBson.htm

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions