SportPaper
SportPaper copied to clipboard
Server's collections performance
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.
You mean using fastutil in more places?
You mean using fastutil in more places?
Yes, like player list and many other, but from what I see you can't just put fastutil in every scenario and hope it will work better. I may be wrong of course.
You mean using fastutil in more places?
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 @Electroid what do you think?
I believe the cost-benefit for this is between marginal and non-existant. Each change has high risk of breaking behavior, and very little to no gain for most cases. Only the hot pieces of code benefit from a change like this, and i believe we've already fixed those (and then broken them, and re-fixed them). If there's a specific proposal for one that can be replaced, alongside a profile that shows the performance impact, then by all means feel free to submit a PR or open a new issue with the specific case, but for the time being i believe this can just be closed.
as for me the standard library should think about it, not third-party libraries
for example, the Valhalla project can "kill" collections for primitives, of course, this is loudly said, but it's better to update the jdk already And yes, it's quite hilarious and hard to migrate.