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 lookup algorithm in areas plugin #390

Open
Major- opened this issue Apr 2, 2018 · 2 comments
Open

Improve lookup algorithm in areas plugin #390

Major- opened this issue Apr 2, 2018 · 2 comments
Labels
medium optimisation plugin request A non-content feature request

Comments

@Major-
Copy link
Member

Major- commented Apr 2, 2018

The area plugin currently stores all of its entries in a Set, which is then iterated over. As this occurs for every movement update, we should really optimise this to some sort of location-aware data structure - probably a quadtree, but there might be alternatives.

@Major- Major- added request A non-content feature request medium plugin optimisation labels Apr 2, 2018
@Major- Major- changed the title Improve area lookup algorithm in areas plugin Improve lookup algorithm in areas plugin Apr 8, 2018
@rmcmk
Copy link
Contributor

rmcmk commented Apr 27, 2018

Quadtree sounds best, I think. Any other ideas on this topic?

@Tomm0017
Copy link

Tomm0017 commented Apr 25, 2019

Unrelated - If we want to improve the lookup, I personally believe that using 8x8 tile areas would be best as it would trigger the event 1-7x less frequently than it does currently. I'm pretty confident that RS uses 8x8 chunks for everything, so there shouldn't be a case where you need to specify an area that can't be made up of 8x8 chunks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium optimisation plugin request A non-content feature request
Projects
None yet
Development

No branches or pull requests

3 participants