GTA online took ages to load, like 10+ minutes on some machines. One guy got really annoyed and investigated. It turned out to be loading a single 10MB JSON file in an incredibly inefficient manner. The JSON file contains about 60,000 items and they need to extract each item from it, but every time they look for the next item they start from the beginning of the file again, despite already knowing where they found the previous item!
All the entries in the JSON list are unique, but the code also checks for any duplicate entries, of course it’s also done in the least efficient way possible requiring 1,984,531,500 comparisons for something that has no effect.
Not only did this one person find these problems but he also implemented a fix that reduced load times by 70% as a result, shaving off more than 7 minutes of load times for some machines. The fact that Rockstar didn’t notice this is frankly shocking and speaks to the fact that they really just don’t care.
https://nee.lv/2021/02/28/How-I-cut-GTA-Online-loading-times-by-70/
sp3tr4l@lemmy.zip 2 months ago
Thats … amazing.
Reminds me of when someone figured out that a huge part of the reason Halo Infinite takes so long to load and go between various menu screens was something like the game redownloading hundreds or thousands of the same exact image, in very high resolutions… basically instead of just pointing multiple instances of the image being used to a single file and directory, for some reason each distinct usage of this same image had its own unique directory…
Its the kind of oopsie daisy you expect from a first time modder, not some of the most expensive dev teams in the world.
Also along those lines, kind of: BF2042 has had and still does have a fundamental flaw with the engine level code for fucking mouse movement interpolation.
They never fixed it. They admitted it exists in their bug logs, but they never managed to fix one of the most fundamental parts of a shooter game, how aiming itself works.