Image: Rockstar Games

A GitHub user by the name of tostercx has shared “proof of concept” code that is reportedly capable of reducing GTA Online’s obnoxiously long loading/startup times by as much as 70 percent. As tostercx explains in a technical blog post, Rockstar Games appears to have inadvertently introduced a CPU bottleneck that stems from poorly optimized code and a 10 MB JSON file containing 63,000 item entries, which could result in as many as 1,984,531,500 checks. Evidently, these checks are why GTA Online players have to wait up to six minutes before they can start exploring and speeding their way around Los Santos.

Here’s the TLDR from tostercx:

  • There’s a single thread CPU bottleneck while starting up GTA Online
  • It turns out GTA struggles to parse a 10MB JSON file
  • The JSON parser itself is poorly built / naive and
  • After parsing there’s a slow item de-duplication routine

“[…] this won’t solve everyone’s load times – there might be other bottlenecks on different systems, but it’s such a gaping hole that I have no idea how R* has missed it all these years,” tostercx wrote. “If this somehow reaches Rockstar: the problems shouldn’t take more than a day for a single dev to solve.”

“You could either switch to a hashmap for the de-duplication or completely skip it on startup as a faster fix. For the JSON parser – just swap out the library for a more performant one. I don’t think there’s any easier way out.”

GTA Online players who are interested in reducing their loading times by as much as 70 percent can download the code from tostercx’s Github page, build the project with MSVC, and inject the DLL with their favorite injector while the game is starting up. tostercx has warned that the code is not meant for casual use, however.

Join the Conversation

7 Comments

  1. All that money from micro transactions and they couldn’t find the time to fix this….
  2. All that money from micro transactions and they couldn’t find the time to fix this….

    Honestly they probably assumed that it was fixed, OR the item deduplication code is such a big deal it HAS to happen to keep things clean on their server end.

  3. Honestly they probably assumed that it was fixed, OR the item deduplication code is such a big deal it HAS to happen to keep things clean on their server end.

    I hope for their sake you are right, because that loading screen was atrocious.

  4. If only someone would get the single-player campaign load times fixed for this and RDR2 I might actually go back and finish both. Hold my beer doesn’t quite describe it. More like go finish the keg and come back.
Leave a comment