I am looking to do some performance profiling for my server, likely using JProfiler, in order to track down where server lag is coming from (I have my suspicions but there are several mods and the only way to *know* is to do a detailed look.) This isn't a request for a tutorial on how to do performance profiling, but rather a request for any tips and guidance from those who are familiar with the Minecraft and Forge codebase, in particular:
1) Aspects of the codebase which are known to be slow but which for one reason or another cannot be optimized (perhaps because doing so would require making very large changes to the base MC codebase), so I don't waste too much time on them
2) Aspects of the codebase which are known to be in dire need of performance attention, and whose fixes would have broad positive impact on enduser experience
3) Gotchas and things to look for which others who have done performance profiling have come across
4) Any other recommendations, particular about the tolerance of the Forge codebase to performance-related pull requests and caveats to that
I'm willing to look at MC, Forge and specific mod code - basically wherever the hotspots take me. I'll be looking at memory usage as well (in my previous experiences with games written in managed languages, misuse of memory is one of the most common performance failures and so deserves extra scrutiny.)
For the record on my server (which is a fully up-to-date 1.12.2 server) I am running the following major mods, so these will be my initial focus:
Tinkers, Immersive Engineering (and related add-ons), Scaling Health, Tough as Nails, Lycanites Mobs, Abyssal Craft, Roots 2, Biomes O' Plenty, Ender Zoo, Baby Mobs
My background is primarily C#, so any pointers about relevant differences between Java and .Net which would help my performance investigations would be appreciated.
Thanks!