One Guy Solves GTA Online's Loading Issues

From GTA BOOM Wiki

If you're a long-time Grand Theft Auto Online player, you are no stranger to loading screens. The game has always been known for long loading times, which are especially egregious to the point of infamy in the multiplayer mode.

Now, one person has decided to dig into the game code, find out why this happens and work out how to fix it.

All these years, plenty of theories about why GTA Online took so long to load have circulated. Some blamed the peer-to-peer server architecture, others said that it's simply due to the immense amount of content that needs to be loaded up. Despite fans putting countless hours into datamining to discover upcoming content, it seems nobody dug into why loading into the game actually takes so long.

Feb18bonuses3.png
All these shirts and masks are clogging up the JSON

Enter GitHub user tostercx, who not only uncovered why this was such an arduous process, but even fixed it, all alone, achieving a loading time reduction of 70% in GTA Online. While you can read a lengthy and very technical explanation of the whole investigation here (and give a small donation to the person making this possible!) we've collected the main points below, written for the layman.

Essentially, there are two main culprits that bog down the loading process, and one of them truly is tied to the amount of content in the game — specifically, the amount of things you can buy. Everything you can purchase in the game has a unique number associated with it, and all of this information is stored in one, comparatively huge, 10 MB JSON file. Every existing variant and combination of all items, vehicles and properties — meaning every possible visual upgrade combination of every vehicle in the game, for example — is in this, totaling at over 63,000 items.

Every time you load up GTA Online, this entire list is checked. However, instead of moving immediately on to the next item upon a successful return, the parse jumps back to the start and goes through the whole list again until it reaches the subsequent item. According to tostercx's calculations, this means that the check runs 1,984,531,500 times every time you load the game!

Jan21bonuses3.png

This was an easy fix, as a minor patch altered the check process to make it hop to the next item upon a return. That's one problem solved.

The other was that, when loading, GTA Online inexplicably used just one CPU core. This, again, was solved rather easily, and tostercx posted his patch on GitHub for anyone to check, download and use — though he does warn that this is merely a proof of work, and probably shouldn't be casually used.

Ultimately, this patch cut down loading times by a whopping 69.4% — from an unpatched 6 whole minutes to get into GTA Online, down to 1 minute and 50 seconds. Granted, still a little long for games this day and age, but an immense improvement.

At the end of their exhaustive investigation, they call on Rockstar to apply this — or a similar — fix to the game, as it would likely take a single developer less than a day to implement. Since this solution was first posted, it has made the rounds online, so there's a chance we will indeed see a solution implemented based on it. If nothing else, we now know it is possible, so failing to solve GTA Online's loading times puts the onus on Rockstar.


Latest News
Gta-online-cayo-perico-heist-challenge.png
Double rewards on Cayo Perico activities this week will be part of a month-long Heist Challenge with massive potential payouts.
Caleb.png
By Caleb Sama November 6, 2024
Gradual-gta-online-revenue-decline-expected-take-two-gta-6-release-1.jpg
Take-Two is preparing for GTA 6 while giving GTA 5 a grand send-off with new updates as it outperforms expectations as it nears its end.
RayIanWrites.jpeg
By Ray Ampoloquio November 6, 2024
Take-two-ceo-confident-gta-6-performance-xbox-series-s-1.jpg
Take-Two Interactive's CEO remains confident in Grand Theft Auto 6's performance despite the Xbox Series S's limitations.
RayIanWrites.jpeg
By Ray Ampoloquio November 6, 2024
Nagasaki-shinobi-gta.png
GTA+ members are getting the Nagasaki Shinobi motorcycle, biker gear, and sweet discounts on clubhouses and weapons.
Caleb.png
By Caleb Sama November 6, 2024
Ex-gta-developer-shuts-down-famous-gta-5-theory-1.jpg
After over a decade of trying to solve the GTA 5 mystery, one of the game's developers has officially pulled the rug.
RayIanWrites.jpeg
By Ray Ampoloquio November 5, 2024