Skip to content

add a LevelData cache to MapData.Get to increase its performance#466

Merged
bigkahuna443 merged 7 commits into
EverestAPI:devfrom
microlith57:perf/cache-leveldata
Jul 8, 2022
Merged

add a LevelData cache to MapData.Get to increase its performance#466
bigkahuna443 merged 7 commits into
EverestAPI:devfrom
microlith57:perf/cache-leveldata

Conversation

@microlith57
Copy link
Copy Markdown
Member

re. #465

@Kalobi
Copy link
Copy Markdown
Member

Kalobi commented Jul 4, 2022

Is there a reason patch_Session couldn't inherit from Session? That would make it unnecessary to reintroduce the Level field.

@microlith57
Copy link
Copy Markdown
Member Author

good question. i will look into it

@DemoJameson
Copy link
Copy Markdown
Member

perhaps replace the getter directly like this
https://github.com/EverestAPI/Everest/blob/dev/Celeste.Mod.mm/Patches/Level.cs#L43-L51

Signed-off-by: Microlith57 <microlith57@gmail.com>
Signed-off-by: Microlith57 <microlith57@gmail.com>
@DemoJameson
Copy link
Copy Markdown
Member

since you have improved mapData.Get, I think there's no need to cache session.LevelData
do we really need to squeeze the little performance

Signed-off-by: Microlith57 <microlith57@gmail.com>
@microlith57
Copy link
Copy Markdown
Member Author

@DemoJameson done!

Signed-off-by: Microlith57 <microlith57@gmail.com>
Comment thread Celeste.Mod.mm/Patches/MapData.cs
Comment thread Celeste.Mod.mm/Patches/MapData.cs
@bigkahuna443
Copy link
Copy Markdown
Contributor

Can you edit the PR title to more accurately describe the changes since it got revised?

@bigkahuna443 bigkahuna443 linked an issue Jul 8, 2022 that may be closed by this pull request
@microlith57 microlith57 changed the title cache Session.LevelData property for performance add a LevelData cache to MapData.Get to increase its performance Jul 8, 2022
Signed-off-by: Microlith57 <microlith57@gmail.com>
@bigkahuna443 bigkahuna443 merged commit 02b1cf2 into EverestAPI:dev Jul 8, 2022
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

Successfully merging this pull request may close these issues.

poor performance getting the current LevelData

4 participants