As I'm going through the class WorldRendererLwjgl, at this stage mostly to understand what is doing, I'm noticing a few things that perhaps might be useful to change even though the functionality wouldn't change at all. I.e. there are currently a bunch of methods called each frame with lines containing code such as:
Also, there are a number of instances of code in this form:
resulting in some key methods, i.e. WorldRendererLwjgl.render() making for a very fragmented reading instead of, say:
I was wondering then if there's a good reason for keeping those bracketing PerformanceMonitor statements there or if I could tuck them inside those method instead.
- CoreRegistry.get(Config.class)
- CoreRegistry.get(Config.class).getRendering()
- CoreRegistry.get(Config.class).getRendering().getDebug()
Also, there are a number of instances of code in this form:
PerformanceMonitor.startActivity("Something");
doSomething();
PerformanceMonitor.endActivity();
doSomething();
PerformanceMonitor.endActivity();
resulting in some key methods, i.e. WorldRendererLwjgl.render() making for a very fragmented reading instead of, say:
doThis()
doThat()
doAlsoThis()
etc()
doThat()
doAlsoThis()
etc()
I was wondering then if there's a good reason for keeping those bracketing PerformanceMonitor statements there or if I could tuck them inside those method instead.