GeyserMC / Geyser

A bridge/proxy allowing you to connect to Minecraft: Java Edition servers with Minecraft: Bedrock Edition.
https://geysermc.org
MIT License
4.75k stars 686 forks source link

Implement JFR profiler on the "geyser" command for standalone. #5053

Open PedroMPagani opened 2 months ago

PedroMPagani commented 2 months ago

What feature do you want to see added?

This will 100% def help improving memory usage and CPU usage of geyser, and possibly even help solving other issues. I think this, along maybe another implementation for a hprof are both benefitial.

Are there any alternatives?

Only through extensions

onebeastchris commented 2 months ago

Why not just use the geyser spark extension for profiling? The whole point of extensions is to be able to add functionality that is useful, but not necessarily vital enough to be added directly into Geyser itself.

PedroMPagani commented 2 months ago

A JFR profiler records both ways(Memory alloc and CPU usage), has a LOT less overhead than a spark extension, and it's much easier to read/use for investigate? you can see a lot more stuff than a spark profiler, you can see garbage collector, number of active threads, different events like parking, etc, while on spark you're not going to see much.

onebeastchris commented 2 months ago

lot less overhead

Got some data for that?

I'll be honest, so far, spark has been beneficial enough to the point where I don't see the need to add a built-in profiler that barely anyone would use. That would be extension territory. Open to hear what others think, but, this seems like a tad out of scope