When devs neglect, DIY: Gaming mods are a dime a dozen, especially for Yard Theft Machine Online. But occasionally, someone comes along with one that is so good and withal so basic that you wonder why the developer didn't do the aforementioned thing in a patch. 1 hacker has shown a fix for load times that is so simple y'all'll wonder why Rockstar didn't have care of it years ago.

Without a doubt, One thousand Theft Automobile Online's load times are atrocious. A non-scientific poll conducted on Reddit last summer revealed that most were waiting three to six minutes for the game to beginning and more than 35 percent of players had load times longer than six minutes. In the worst-instance scenarios, wait times were over 15 minutes.

A hacker who goes by T0st looked into what might be causing his half dozen-minute load times. After dumping the process stack, he discovered 2 bottlenecks that maxed out a single CPU thread. A poorly written routine was inefficiently parsing a 10MB JSON file containing over 63,000 items.

As it turns out, the JSON file housed items purchasable through in-game shops (not to be dislocated with microtransactions). The routine reads each entry in the file and and so stores it in an assortment. With each pass, information technology rechecks the entire array for duplicates before inserting the new item. As can be imagined, this procedure gets longer and longer equally the array grows.

To fix the problem, T0st created a DLL that eliminates the ii bottlenecks. The first fix "caches" long string lengths.

"If information technology'southward chosen once again within the string's range, [information technology volition] return [the] cached value," T0st writes.

Since this fix eliminates echo entries, the indistinguishable check is no longer necessary. So the second office of the DLL merely inserts the values into the array.

The results of these two patches are pretty remarkable. With only the duplication check fix installed, load time was modestly reduced from half dozen minutes to 4.5 minutes. The JSON parser was much more effective, lowering the look to ii minutes, 50 seconds, and implementing both patches into the DLL improved load time by about 70 per centum (or 1m 50s).

Results may vary depending on rig configuration, but the optimizations should improve loading speeds significantly for any setup.

T0st posted the proof of concept to GitHub if you're interested, though he warns that injecting information technology while online might become you lot suspended. His writeup on how he establish and fixed the problem is a pretty good read, too. He hopes that Rockstar volition get air current of his PoC and issue an official patch, which is not an unreasonable inquire for the studio'south vii-year-erstwhile cash cow.

"If this somehow reaches Rockstar: the problems shouldn't take more a day for a single dev to solve," he writes. "Delight practice something about it."

Yes. Please practise.