I noticed trying to load bigger Json files (100kb+) will result in a huge lag spike. Trying to load files bigger than 1mb can take several minutes
I looked at the JsonFileLoader class ant noticed a huge performance issue in loading files (saving is fine)
The problem ist, that each line is read through FGet and concatenated to the output string, which is a problem for two reasons:
- A lot of small IO operations, which are unnecessarry, because the whole file needs to be loaded anyways
- A lot of string concatenations, which are especially expensive, because of c++ internally copying the whole string each time, stressing the CPU and Ram