With smaller test data this may have been harder to catch. I think most people’s mental model of sscanf is that it would be linear in the number of bytes it scans, not that it would be linear in the length of the input. I don’t think the lesson here is “be careful when parsing json” so much as it’s “stop writing quadratic code.” The json quadratic algorithm was subtle. But if it was a CPU bottleneck then who works there that wouldn't just be irked to try to nail it? I mean it seems like a natural thing to try to understand what's going on inside when time is much higher than expected even in the case where performance is not crucial. But how could R* not do this? GTAV is so full of great engineering. Stunning work just having binary at hand. If this is true that's the biggest WTF I saw in the last few years and we've just finished 2020. Parsing JSON?! I thought it was some network game logic finding session magic. Then there are man-years wasted (in a way different than desired). I'm certain that many people left this game because of the waiting time.
Holy cow, I'm a very casual gamer, I was excited about the game but when it came out I decided I don't want to wait that long and I'll wait until they sort it out.