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

perf: Faster world lookup #4420

Closed

Conversation

Vrganj
Copy link
Contributor

@Vrganj Vrganj commented May 5, 2024

Description

Make world lookup faster using an IdentityHashMap and computeIfAbsent.

Submitter Checklist

Preview Give feedback

@Vrganj Vrganj requested a review from a team as a code owner May 5, 2024 16:06
@NotMyFault NotMyFault requested a review from a team May 19, 2024 18:11
@NotMyFault NotMyFault added the Enhancement New feature or request label May 19, 2024
@dordsor21
Copy link
Member

I do not think we want to be forcing BukkitWorld objects to be kept in memory, as if a world is unloaded and loaded again we'll have garbage objects kept in the map that won't be removed. Elsewhere (somewhere in P2 and/or FAWE) we reference worlds with a WeakReference to ensure we do not do this.

@dordsor21 dordsor21 added Awaiting Response on-hold This PR is on hold until feedback has been addressed needs-justification The motivation and desired outcome needs to be clarified. labels Jun 1, 2024
@dordsor21
Copy link
Member

See #4439

Copy link

github-actions bot commented Jun 2, 2024

Please take a moment and address the merge conflicts of your pull request. Thanks!

@dordsor21
Copy link
Member

Gonna close this as stale

@dordsor21 dordsor21 closed this Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Response Enhancement New feature or request needs-justification The motivation and desired outcome needs to be clarified. on-hold This PR is on hold until feedback has been addressed unresolved-merge-conflict
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants