Closed Emiel45 closed 7 years ago
Interesting. I'd imagine this would help across all versions, not just 1.8.
Could you submit this in the downstream repo (https://github.com/dmulloy2/ProtocolLib)? It's easier to pull there and push the changes upstream.
Sure, shall I just resubmit the pull request there and close this one?
I don't seem to be able to make a pull request on your fork, it automatically identifies this one as already existing. Maybe I'm doing something wrong?
You should be able to clone my fork and edit it.
That's ...odd... but that's git for ya.
Looking up classes often causes performance issues. If ProtocolLib is used with old versions of Minecraft (1.8) it will try to lookup classes like the ChunkPosition class, as a result this class gets looked up over and over again. Looking up classes causes locking and can become a very slow and intensive operation. To combat this I have made a small change to the CachedPackage class so it remembers if classes weren't found previously. This has been tested and appears to fix the performance issue I was having.