Enlarge / You possibly can spend much less time taking a look at loading screens like this with a brand new DLL repair.

A hacker going by the deal with T0st says he is found out a core problem that prompted longer-than-necessary load instances in Grand Theft Auto On-line for years. The hacker has launched a proof of idea DLL repair that shortens these prolonged startup instances by roughly 70 {2d266c2b7f7b21b9d5247541775384085ff4c78fbe34d1f6195ea0b207eacd24}.

Grand Theft Auto On-line‘s PC load instances have been a persistent problem for seven years now, remaining sluggish regardless of basic enhancements to {hardware} and the sport’s standing as a seamless profitable income stream for writer Take Two. An nameless Reddit ballot final 12 months discovered that roughly half of gamers had been ready three to 6 minutes for the sport to load up, and about 35 {2d266c2b7f7b21b9d5247541775384085ff4c78fbe34d1f6195ea0b207eacd24} of gamers ready even longer to start out each session.

That is not a scientific survey or something, however even accounting for self-selection and reporting points, these load instances are very lengthy, particularly for such an outdated sport. The issue is even tougher to know when the single-player Grand Theft Auto V tends to load many instances sooner.

Saving time with disassembly

To unravel the issue, T0st writes that they began by profiling their very own CPU, to attempt to determine why the sport was maxing out a single CPU thread for over 4 minutes throughout loading. After utilizing a software to dump the method stack and disassembling the GTA code because it was operating in reminiscence, T0st seen a set of (considerably obfuscated) features that appeared to be parsing a 10MB JSON file with over 63,000 whole entires.

The JSON file in query gave the impression to be the “internet store catalog” that describes each single merchandise GTA On-line gamers should buy with in-game foreign money. Parsing a 10MB file should not be too a lot of an issue for a contemporary laptop, however a number of obscure issues within the particular implementation appear to result in large slowdowns.

For one, the precise operate used to parse the JSON string (seemingly sscanf, on this case) was apparently operating a time-intensive strlen checking operate repeatedly after the learn for each single piece of knowledge. Merely caching that string size worth to hurry up these checks resulted in an over 50 {2d266c2b7f7b21b9d5247541775384085ff4c78fbe34d1f6195ea0b207eacd24} discount in load instances by itself, T0st writes.

After parsing all this JSON knowledge, GTA On-line appears to load it into an array in a particularly inefficient approach, checking your complete array for duplicates from scratch because it grows. Changing that course of with a hash desk that may shortly verify for duplicates led to a roughly 25 {2d266c2b7f7b21b9d5247541775384085ff4c78fbe34d1f6195ea0b207eacd24} load time discount by itself, T0st writes.

With these two fixes mixed, T0st says GTA On-line‘s load time went down from six minutes to simply beneath two minutes on the take a look at machine. These all for replicating the outcomes can construct the same DLL from T0st’s supply code. Gamers ought to solely accomplish that at their very own threat, although, since this type of modification may simply (and erroneously) set off the sport’s anti-cheat checks.

In the meantime, T0st writes that implementing this repair for all gamers on Rockstar’s aspect “should not take greater than a day for a single dev to resolve.” This is hoping the renewed consideration this problem is getting will get Rockstar to take action earlier than later.

Source link