
Can you
Closed this issue ยท 14 comments
replace all string occurrences with string_builders cause every use of strings goes straight into memory, and then it grows exponentially due to having to overwrite each occurrence every time text is entered or read.
I have been searching for a couple of hours for a memory mod, and the only one that is any good is not fixing it.
FerriteCore saves memory in a list of ways you can read here.
Speaking of that, if you really want to know what takes up so much CPU/memory, use F3 + L to activate a profiling log, run around and stuff until it's done, then take a look at the ZIP file it generates.
Or attach it here and I'll look it.
and then it grows exponentially due to having to overwrite each occurrence every time text is entered or read.
Also, this is incorrect. You can hold a reference to a string of text for as long as you want. Thanks to Java's string pools, a string constant like "hi_there"
only has one instance. String concatenation is what takes CPU/memory time. Barely at all, though.
a mod was claiming increased fps, and it does so, at the cost of memory and ticks