Verse
JCHJava Community | Help. Code. Learn.
•Created by Verse on 2/6/2025 in #java-help
Performance & Readability Improvements
I do have quite big classes, I wanted to break them down into smaller classes but i entered issues while doing that. My goal is better readability, equal performance compared to now when all modules enabled and better performance than now when all modules disabled. Im trying to avoid class loading,initialisation and registration of handlers that arent needed aswell as them registrated multiple times.
For example if i have a field that controls whether a module is going to be loaded or not, but the field also needed for a module and changing during runtime, then i have basically one part of the module i the class that refers execution to modules and one part in the module class, which doesnt look good. Also if i have smaller classes i need more total time to load these and they consume more file size and metaspace memory? I also noticed if i load on demand that i will get minor lag spikes. If i though keep them in big classes then i will have the best performance when everything is used and loaded but bad performance when only a fraction is enabled.
284 replies
JCHJava Community | Help. Code. Learn.
•Created by Verse on 12/19/2022 in #java-help
How to generate these colors?
Im not sure if it is rgb or smth else but like this: 1521273. What format is this and how to generate it :) ?
22 replies
JCHJava Community | Help. Code. Learn.
•Created by Verse on 11/20/2022 in #java-help
ServerSide links to ClientSideProxy
if i do now
proxy.getMap().clear()
on the client the server map will be also cleared, idk why
when printing proxy right after that i get mob.ClientProxy@16125bbc
when printing proxy inside getMap() i get
Server thread [mob.ClientProxy:56]: clientside_map
and
CLient thread [mob.ClientProxy:56]: clientside_map
If i also do FMLCommonHandler.instance().getEffectiveSide()
i get Side.Server
when im in the ClientProxy class.
Idk what todo now5 replies
JCHJava Community | Help. Code. Learn.
•Created by Verse on 11/19/2022 in #java-help
Method give wrong return statement
if i do now
proxy.getMap().clear()
on the client the server map will be also cleared, idk why
when printing proxy right after that i get mob.ClientProxy@16125bbc
when printing proxy inside getMap() i get
Server thread [mob.ClientProxy:56]: clientside_map
and
CLient thread [mob.ClientProxy:56]: clientside_map
12 replies