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

Get rid of cached resolved CompressBatchPromises from ChunkCache #6578

Open
dktapps opened this issue Dec 17, 2024 · 0 comments
Open

Get rid of cached resolved CompressBatchPromises from ChunkCache #6578

dktapps opened this issue Dec 17, 2024 · 0 comments
Labels
Category: Network Related to the internal network architecture Performance Type: Enhancement Contributes features or other improvements to PocketMine-MP

Comments

@dktapps
Copy link
Member

dktapps commented Dec 17, 2024

Problem description

We currently keep around a lot of boxed caches inside resolved CompressBatchPromises.
These objects are a waste of memory and take a toll on the GC.

They also force the use of closures to retrieve promise values, which means even more useless objects if the cache has already been populated.

Proposed solution

This kind of change should be done in ChunkCache. It may cause some complexity increase, but the reduction in object allocations is worthwhile in hot paths.

Alternative solutions that don't require API changes

@dktapps dktapps added Category: Network Related to the internal network architecture Type: Enhancement Contributes features or other improvements to PocketMine-MP Performance labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Network Related to the internal network architecture Performance Type: Enhancement Contributes features or other improvements to PocketMine-MP
Projects
None yet
Development

No branches or pull requests

1 participant