Jannah Theme License is not validated, Go to the theme options page to validate the license, You need a single license for each domain name.
Other

Grand Theft Auto Community Member Finds & Fixes Load Time Bug

GTA5 tweaker’s wild claim about improving load times by 80% turns out to be true.

If you are a GTA V online player, you can’t have failed to have noticed the incredibly poor loading times that have plagued the game since its release. Even playing the game on the next generation PlayStation 5 and Xbox One(before the most recent update) with their next-generation M.2 SSD storage technology still resulted in loading times that just seemed completely unreasonable – Spiderman: Miles Morales has almost instant loading times on Playstation 5. So what is (or was) the problem with Grand Theft Auto V?

Things Got Much Worse Before They Got Better

When Grand Theft Auto V’s online component originally opened to players, the load times were already long. Rockstar has been patching the game continuously since its release though, and one player, in particular, was quick to notice that load times were being extended still further each time Rockstar issued a patch for the game.

The situation was particularly acute after the Mid-2019 update, which introduced the Diamond Casino to the GTA V open world. The new casino was extremely popular with players of the game, and the vast majority of players simply accepted that longer load times were an inevitable consequence of the huge amount of new features being added.

The Diamond Casino allows GTA fans to play blackjack live, poker, slot machines for money, or virtual horse racing using their in-game currency. All of the games are just for fun, of course – Rockstar hadn’t gone ahead and added real gambling into their most popular game!

T0ST was a fan of casino games and was excited to try out the new Diamond Casino. But when this patch almost doubled the loading time when opening the online game, he was immediately suspicious that there was something else going on here with these extremely long load times.

The Technical Explanation

The setup T0ST was using wasn’t anything special – a several-year-old gaming PC, using an AMD FX-8350, a Kingston SATA SSD, 16GB of DDR3-1333 memory, and an NVIDIA Geforce GTX 1070.

Firing up the story mode resulted in loads times of roughly 70 seconds, which seemed (almost) reasonable, but the online mode took 360 seconds to drop his character into the game. T0ST wondered if his slow system was the cause, but after running a poll at Reddit he quickly determined this was a widespread issue.

Investigating the Problem Using Basic Tools

T0ST did some investigating and noticed that the task manager showed a single core hitting 100% usage around 70 seconds into loading – right after the shared assets from story mode finished loading. What was most interesting about this was the fact that there was no disk or network activity for the remainder of the loading time.

The programmer then tried using profiling software to see which functions of the GTA V program were using the most CPU time. A good starting point, but more advanced software was required to take this investigation to the next step.

Disassembling the Games Code to Find Out What is Really Going On

A disassembler converts software into human-readable output in Assembly Language. Using the popular Ghidra disassembler, T0ST found two bugs in the GTA5 code. The first occurred whilst assets were being parsed from a 10MB JSON file, a procedure that was badly coded resulting in all 10,247,680 characters of the file being counted 63,000 times during every single loading sequence.

Secondly, all of the entries in the JSON file were being checked for duplicates in an extremely inefficient way. A total of 1,984.531.500 checks were being performed to complete this task, the vast majority of which were unnecessary. You don’t have to be an expert programmer to realize these are extremely inefficient techniques!

Why Wasn’t This Issue Spotted Sooner?

It’s quite a mystery, in all fairness. Rockstar certainly has a lot of talented programmers working for them, so the fact T0ST managed to implement a much faster set of procedures without having access to the game’s source code is truly remarkable. When he released his own “experimental” patch and it showed a dramatic improvement of up to 80% reductions in load times, Rockstar certainly sat up and took notice then!

The developer does have a bug bounty program, but an issue like this would not normally be covered under the terms of the promotion. Fortunately for T0ST, Rockstar was so impressed with his work that not only did they integrate his changes into the next GTA5 update, but they paid him $10,000 for his trouble too.

A Final Note

Grand Theft Auto 5 is the most successful entertainment product of all time with 90 million sales and $6 billion in revenues. That being the case, it’s amazing that there weren’t more complaints to Rockstar about the extremely slow loading times.

It guess it just goes to show, when your title is as universally acclaimed as GTA5 then people will happily put up with a few minutes of loading – there can be no doubt that everyone who plays the game is much happier following this release, however!

Kanji Prearms

Kanji has been holding a controller since he could walk, and loves nothing more than talking about his latest conquest with friends.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button