Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

More use of FastUtil #65

Open
andreasdc opened this issue May 30, 2022 · 0 comments
Open

More use of FastUtil #65

andreasdc opened this issue May 30, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@andreasdc
Copy link

What do you think about changing server's collections? Like player list or other collections, to the ones that have better performance? That would need heavy testing and benchmarks of course.
I saw Paper uses fastutil in their version of PlayerChunkMap, I don't remember exact name of the new class, but I think it's PlayerChunk, it really looks like it.
There is fastutil for example in:
PacketPlayOutEntityDestroy
PacketPlayOutGameStateChange
PacketPlayOutMultiBlockChange
PlayerMap
NBTTagLongArray
Chunk
NBTTagList

I think fastutil in PlayerMap (PlayerChunkMap and dirtyBlocks on 1.8) will be a huge improvement. What do you think?

I think the best will be in PlayerChunkMap, they have fastutil ShortSets on 1.17, every block change etc. has to go through it.
PlayerChunkMap 1.8:
https://pastebin.com/raw/s3W0Amk6
PlayerMap 1.17:
https://pastebin.com/raw/DmFDyLz2

Additionally I can say that changes in PlayerChunkMap cost more than actually changing blocks.

@windcolor-dev windcolor-dev added the enhancement New feature or request label May 30, 2022
@Na7hanie1 Na7hanie1 mentioned this issue Jun 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants