WindSpigot icon indicating copy to clipboard operation
WindSpigot copied to clipboard

Optimize Network Queue (SportPaper-0108)

Open FirephoenixX02 opened this issue 2 years ago • 3 comments

[+] Add CachedSizeConcurrentLinkedQueue from Paper [~] Change Network Queue in MinecraftServer from ConcurrentLinkedQueue to CachedSizeConcurrentLinkedQueue. In the Future maybe other Queues can be changed to this for a slight performance increase.

FirephoenixX02 avatar Nov 04 '23 12:11 FirephoenixX02

Are you sure that it's better? Incrementing was heavy, I would benchmark it before adding.

andreasdc avatar Nov 04 '23 13:11 andreasdc

Are you sure that it's better? Incrementing was heavy, I would benchmark it before adding.

Im not totally sure, but Paper added it so it seems that they atleast thought it was a good idea. Im don't exactly know how I would Benchmark this but I would do one if I could. It just looked good on paper so I thought I would add it.

FirephoenixX02 avatar Nov 04 '23 21:11 FirephoenixX02

Benchmarking would need to test adding and polling from the queue at once.

andreasdc avatar Nov 04 '23 21:11 andreasdc