Extra Save Files

While looking for ways to add my own data to the save file, I noticed, that there is a character limit to save files:
Code:
DataManager.saveGameWithoutRescue = function(savefileId) {
    var json = JsonEx.stringify(this.makeSaveContents());
    if (json.length >= 200000) {
        console.warn('Save data too big!');
    }
    StorageManager.save(savefileId, json);
    this._lastAccessedId = savefileId;
    var globalInfo = this.loadGlobalInfo() || [];
    globalInfo[savefileId] = this.makeSavefileInfo();
    this.saveGlobalInfo(globalInfo);
    return true;
};
After some web searching I only found a few topics on this, one mentioned that this 200000 limit is because of parser issues when files get longer than that. One topic also mentioned reaching this limit on a 101x100 or so map with 100 events.

I don't plan to have that many events on a map, but it made me a bit nervous about just putting my own save data into the regular file.

What I do might have are files that look like this in json:
Code:
[
[ {"x":100,"y":100,"waiting":12000,"busy":120}, {"x":120,"y":120,"waiting":7000,"busy":110} ],
[ {"x":12,"y":200,"waiting":14000,"busy":170} ]
]

They store the minimum amount of information I need if I want to recreate the Townbuilding I have in VXAce in MV.
So a single building is about {"x":100,"y":100,"waiting":12000,"busy":120} which is length 44. Lets be a bit generous and assume 20 buildings for each town and 10 towns each in 7 regions, we are already at ~ 62000 charcters not counting , and [].

From what I have read in the past 2 Threads there are probably 2 ways to save, one for desktop and one for all deployment.

So should I try and create my own save files in addition to the default ones to store that data and edit the DataManager functions based on the existing DataManager functions, or is there again a better way, thats just wasn't picked because it didn't exist in the old version of JS that was used when MV was created?
The reason 200000 is the limit is because some browsers' JSON parsers use memory buffers of this size (or at least they used to in past). I haven't had any problems on Chromium based browsers with larger files, but I did not try to push my luck to what's the max size they can parse without an issue. MV still needs to carry this warning to ensure as much compatibility with various browsers as possible anyway.
Nevertheless, there are always solutions. In fact this problem in particular can be solved simply by separating the file into multiple smaller ones and loading them individually if needed.
So it's not whether you should or should not, it's whether you need or need not. And I assume you can answer this question yourself, since who knows better the length of savefiles in your game than you?
Eh, it's just a warning and 200 000 byte limit is arbitrary. I would not worry about it.

For theoretical purposes, the maximum length of a string in JS is roughly 1GB which is 10 000x larger (4 orders of magnitude larger) than that "limit". Of course I would not recommend something so big because it would require a large amount of RAM.

Spoiler
If you want to see the maximum length of a string, it depends on the environment, but you could test it with something like:
Code:
var str = 'a';
while (true) {
    str += str;
    console.log(str.length);
}
For me it crashed somewhere more than 500MB
Thanks to both of you.
I'll just go with adding new save data to the regular file for now, if I encounter any problems I can change it later on.

Original thread: https://forums.rpgmakerweb.com/threads/extra-save-files.105947/