ProjectKig / KigPaper

Paper 1.8.8 fork with critical performance tweaks, bug fixes and gameplay improvements.
https://playkig.com
43 stars 11 forks source link

server: Use EnumMap for CraftPlayer#playEffect() #6

Closed archer-321 closed 2 years ago

archer-321 commented 2 years ago

This PR adds a patch that improves the server's performance by replacing an inefficient String#replace() that's called inside a loop with an EnumMap. This is most noticeable when using lots of particles.

roccodev commented 2 years ago

Thanks! Could you fix this for CraftWorld.Spigot as well? It might be worth to use the new import solution to edit EnumParticle and add the map there.

archer-321 commented 2 years ago

I'm not quite sure whether that's what you mean with "the new import solution", but this should also apply this patch to CraftWorld.