Sunday, 28 February 2021 13:14

Programmer Lowers GTA Online Loading Time by 70% | Game Rant

Written by Curtis Mutter
Rate this item
(0 votes)
Grand Theft Auto Online takes a notoriously long time to load, and one fed up player finds the problem and increases load times by 70%.

It's true that almost every single aspect of gaming has improved since the cartridge days. The graphics are better, the games are longer, and the multiplayer goes beyond two or four controllers and split-screen on a CRT TV. One aspect of gaming that is far worse, however, is the loading times, and despite reaching its highest player base ever late last yearGrand Theft Auto Online is one of the worst offenders where loading times are concerned.

In today's day and age it is news worthy when a game has fast loading times. The PlayStation 5 edition of Spider-Man: Miles Morales loads pretty fast and many articles were written on the subject of a triple A game, for once, not taking minutes off the player's life in-between levels. As GTA's online instalment is notoriously on the other side of that coin, one gamer and programmer set out to discover what, exactly, was taking so long.

RELATED: GTA Online Update Brings Back Peyote Plants

The person in question goes by simspelaaja on Reddit, and after waiting for GTA Online developer Rockstar to fix the issue for years, decided if they wanted it done, they had to do it themselves. After reviewing how the game was loading on their machine, simspelaaja knew the long load times had to be the fault of poor coding. "GTA decides to max out a single core on my machine for four minutes and do nothing else," they write, adding, "What, is it mining crypto or something? I smell code. Really bad code."

Digging deeper, they discovered that the problem originates from a measly 10mb JSON formatted catalog that lists the in-game items available for purchase in GTA Online. While GTA Online's new weaponized dinghy is cool, to simply list that it's available in the game shouldn't cause loading times upwards of six minutes. Well, it turns out the problem is twofold.

Firstly, because of odd protocol inherent in a C++ function called sscanf, per every few bytes of data loaded every single character in the 10mb string is read again, and again, and again. The second problem comes in when the system checks for every possible instance of an item, from a list of roughly 63 thousand entries, which, simply put, is not a well optimized process. With this in mind it's no wonder GTA Online takes longer to load than the longest Dragonball Z fights take to play out.

Not content with simply proving the problem exists, simspelaaja wrote a .dll file and fixed up the JSON coding issue and now has everything running like butter on their personal system. In fact, with both issues patched, they got the load time down from six minutes to one minute and fifty seconds. Of course, Rockstar is busy at work on PS5 and Xbox Series X releases of GTA 5, but simspelaaja states that it shouldn't take a single dev more than a day to take the same steps they did so everyone can load GTA Online much, much faster.

GTA Online is available now for PC, PS4, and Xbox One, with versions for PS5 and Xbox Series X in development.

MORE: Grand Theft Auto's Biggest Controversies

Source: nee.lv

Read 77 times
Login to post comments