Canary

Canary

6M Downloads

Poi Optimization request (Please backport too if older versions are still supported)

Speiger opened this issue ยท 0 comments

commented

o/ ChunkPregen dev here working on increasing compat with the lithium ports a bit, and have fixed most of it.

For future versions I do have a request.
Could you change the base implementation that you use for your ListeningHashMap from OpenHashMap to LinkedOpenHashMap?
The idea being that you guys turn the Map into an access cache that moves the last accessed entries to the end while least used entries get pushed to the front of the iterator.

Because at the moment ChunkPregen when a Lithium mod is installed fights with the poi system over which pois should be removed.
Because the ordering roughly always stays the same and ones that should be deleted stay more likely loaded then getting unloaded.

Here is the code required to make it work.

@Override
public V put(long k, V v) {
	return putAndMoveToLast(k, v);
}

@Override
public V get(long k) {
	return getAndMoveToLast(k);
}

I doubt you guys support past the latest version, but if you do it would be really epic if you could backport this too.
Have a nice day :)