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

MapObjectGroup.objects keys should be IDs, not indices #849

Closed
Wotuu opened this issue Jul 17, 2021 · 0 comments
Closed

MapObjectGroup.objects keys should be IDs, not indices #849

Wotuu opened this issue Jul 17, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request map Issue that is related to the map

Comments

@Wotuu
Copy link
Contributor

Wotuu commented Jul 17, 2021

This can cut out a lot of loops and make the map more performant/responsive.

@Wotuu Wotuu added enhancement New feature or request map Issue that is related to the map labels Jul 17, 2021
Wotuu added a commit that referenced this issue Aug 20, 2022
The mapobjectgroup.findMapObjectById() method used to iterate over all objects it had to find a map object - this internal array has been replaced with an object instead, allowing instant lookups instead of costly loops. Locally the performance increase is noticeable, on prod it won't be as noticeable but on lower performing hardware it can be much quicker
@Wotuu Wotuu self-assigned this Aug 20, 2022
@Wotuu Wotuu closed this as completed Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request map Issue that is related to the map
Projects
None yet
Development

No branches or pull requests

1 participant