@icedquinn Not sure I agree. The whole point of the GC not being explicit is to reduce human error, and it does a good job at that. Java performance compared to many other interpreted languages is exceptional (not so much .net).
You also do have the ability to "suggest" the invocation of garbage collection should you need to add some explicit control to speed things up. but it rarely makes much of a difference.
> they stop the world without telling the process
No not really. The GC doesnt freeze your program, it is smart enough to work within the idle time most of the time. You'd be hard pressed to get the GC to glitch your program or slow things down compared to manually doing it. If you do it manually and do a really good job in almost all situations I you will likely get improvements so minimal you could barely measure it.
@icedquinn If you are worried about momentary latency at moments when latency is super critical then use the Java Real-time specification, JSR1
Java lets you do that.
System.gc()
If you call that it prioritized the GC, except you dont need to stop. you can keep running and the GC will clean up the 8gb heap without needing to stop your program at all (though you are welcome to stop if you have nothign to do and speed up the GC a bit I guess).
Did you read what I said... as I said you can do that... you just have no need to stop and restart the health check. Though you can if you really want to for some reason.
System.gc(), call it when you have downtime, you now just accomplished what you wanted.