4 ms·
Probably added after profiling on that system found that the GC pauses would fit within frame budget, whereas not running it every frame would have a long pause
by __s 5y ago
Probably added after profiling on that system found that the GC pauses would fit within frame budget, whereas not running it every frame would have a long pause eventually drop frames
- jonny_eh 5y agoThis! If you GC every frame, you can almost guarantee that it runs fast enough to not cause a frame skip.
- kaba0 5y agoOnly true for Java runtimes at the time. With modern JVMs with generational GCs, it is detrimental even. Profile it, and only let allocation rate increase to an acceptable level that can be reclaimed easily. Or nowadays one can use a low latency GC as well.