Newsroom News Breaking Comics Tags RSS
News video games 04 March 2021, 17:14

author: Adrian Piotrowski

Internet User Cuts GTA Online Loading Time by Almost 70% [UPDATED]

An internet user known as T0ST has found a way to reduce the loading time of GTA V's online mode by almost 70%. On his website, he also explained why GTA Online takes so long to load.

Update:

One of our readers sent us a message that T0ST's work has received an update from other developers, available here. It enables us to use the patch on all platforms and operating systems (the original only worked on Steam and Rockstar Games Launcher on Windows). The implementation rules are the same as in the first version. Again, we warn that using this patch may result in account suspension.

Original content:

IN A NUTSHELL

  • An Internet user known as T0ST found the cause of long loading times in GTA Online;
  • The culprit turned out to be a faulty code that performed unnecessary actions associated with items placed in the game;
  • Elimination of the bug cut the loading time of online mode from 6 minutes to 110 seconds.

Despite the fact that almost 8 years have passed since the release of Grand Theft Auto V, the included GTA Online is still very popular, and remains a gold mine for the publisher, Take-Two. However, the online mode of Rockstar Games' title is also known for its very long loading times reaching up to 10 minutes. This problem is present in the game from the very beginning, but only now one of the Internet users, known as T0ST, decided not only to look at it, but also, if possible, eliminate it .

In the end, he succeeded. Using a computer with average parameters, T0ST reduced the loading time of the online mode by almost 70 percent. All this with the help of small changes to the game's flawed code. Here is a detailed description of how he did it.

Internet User Cuts GTA Online Loading Time by Almost 70% [UPDATED] - picture #1
Online mode takes a good few minutes to load.

Finding the culprit

T0ST first decided to compare the loading times of the two available game modes. To do this, he used his computer, whith an AMD FX-8350 processor, 16 gigabytes of RAM, a budget SSD, and an Nvidia GeForce GTX 1070. It took about 70 seconds for the story campaign to load. To start the online mode as much as 6 minutes (both times were counted from the moment Rockstar's logo appeared, with the start menu turned off).

The user wanted to determine what exactly was happening to the computer while the online mode was loading. To do so, he started loading GTA Online again, but this time he turned on Windows' built-in task manager. After a minute, he noticed that CPU usage had increased from 25% to over 60%. What's more, the game was only using one core out of eight available. The rest of the components were doing virtually nothing for almost five minutes. T0ST concluded that the problem was in the game code...

Internet User Cuts GTA Online Loading Time by Almost 70% [UPDATED] - picture #2
CPU consumption while loading GTA Online on a computer with average parameters. Source: Nee.lv (T0ST's website)

Sisyphean labor

...and he was absolutely right because the culprit turned out to be a file with a size of just 10 megabytes and a .json extension. It contains a list of all items available for purchase in the game (those that can be purchased with virtual cash, not via microtransactions) and their upgrades. There are about 63,000 of them. The problem is that the moment the game loads the file, it runs a syntax check of it. And this is repeated exactly as many times as there are items in the file.

Additionally, all items have their own "hash", a unique code to identify them. Each time the analysis of an item is completed, it is put into a list and compared with those already in the list. This is to avoid cases of duplicate items. Initially, the list is empty, but over time it fills up with all 63,000 items and each must be compared to the other. T0ST has calculated that almost 2 billion actions in total are performed in the process. What's more, since each item has a unique "hash", the whole work is pointless from the beginning.

Solution

T0ST created his own code, which overwrote two of the game's flawed functions. It reduced the number of syntax checks performed by the game to one and disabled duplicate item checking. The solution to the first problem reduced the loading time to 4.5 minutes, and in combination with the second solution to just 110 seconds. The developer has shared his work on GitHub and it can be downloaded here. However, T0ST doesn't guarantee that the solution will work on other computers, especially high-end rigs (the difference may not be noticeable), and warns that adding this code may get your account banned.

The programmer hopes that Rockstar will take a moment to fix this bug and release an official patch, as he believes this can be fixed in by one man in less then a day.

The above translation is both based on T0ST's post from his website and an article by Will Judd, a journalist at Eurogamer and one of the members of the Digital Foundry team.

Grand Theft Auto Online

Grand Theft Auto Online