You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I haven't used your mod yet, but I was warned that it has poor performance and I decided to see why. I have one question for the code: does it really create a separate thread for each player? I see no reason to use a separate thread in principle for this.
The text was updated successfully, but these errors were encountered:
Thread creation is too expensive and it takes too many resources for each player. In addition, the player can exit and enter the server later (or there may be many players), due to which there will be an unacceptable amount of such allocations. This thread can be transferred to other tasks of the game. I suggest removing this logic and leaving the DeObfuscator class as a Runnable implementer for future code base changes.
As a last resort, we can use some implementation of the thread pool, but I'm not sure if the code slows down mspt that much. Its ticking after the player's tick also seems strange to me, maybe we just iterate over all the players?
Hi, I haven't used your mod yet, but I was warned that it has poor performance and I decided to see why. I have one question for the code: does it really create a separate thread for each player? I see no reason to use a separate thread in principle for this.
The text was updated successfully, but these errors were encountered: