Home » Technology » Developer limits loading time in GTA Online by almost 70 percent with proprietary code – Gaming – Geeks

Developer limits loading time in GTA Online by almost 70 percent with proprietary code – Gaming – Geeks

A developer has succeeded in loading GTA Online 69.4 percent faster with modified code. This has been achieved by simplifying the process of how the system reads and processes the in-game items. The game is notorious for its long loading times.

The developer named T0ST writes that although he uses an outdated computer with an AMD FX-8350 CPU and an Nvidia GeForce GTX 1070, in combination with DDR3 RAM, it took six times longer to load GTA Online than the story mode. That story mode took 70 seconds, while the loading time for the online mode took six minutes. Logically, this difference shouldn’t be that big, according to the developer and others. Its outdated Bulldozer CPU is admittedly not high single threadperformance, which could be part of the explanation, but it turned out there was more to it.

He tracked down the problem by opening the task manager in Windows. There it turned out that during the first minute the common elements are loaded that are used for both the story and the online mode. After that, a process appeared to start which drastically increased the use of a single core of its CPU for more than four minutes, while there was little or no use of the storage, the network, the GPU or the working memory. The developer says he finds it strange that only the CPU was used.

Eventually he came to the conclusion that there are two bugs or problems in the code. First of all, the game reads all items in the game in a 10MB JSON text file. There are 63,000 entries in. That is a list of all items to be purchased in the game, which, according to the developer, should not directly involve microtransactions. After reading each of the 63,000 items, each character in that entire text file is counted again, 63,000 times. Second, to prepare the read-in item data, data such as the name and price of the item, and a hash of the item loaded. Each time GTA Online saves an item, it checks the entire list one by one, comparing the item’s hash to see if it is in the list. Basically, the hash value of the stored item is compared to the hashes of any other item that has been previously stored. This can lead to (63000 ^ 2 + 63000) / 2 checks, or 1,984,531,500 pieces. GTA Online does this to make sure there are no duplicate items in the final list, to prevent hackers.

According to the developer, this process is a drain on the CPU and is not even necessary, as the list of hashes is empty before loading the JSON file. In addition, all items in this file are unique, so according to T0ST it is not necessary to check whether or not they appear in the list. In addition, he points out that there is even a function available to insert the items directly.

On the basis of its own code it appears possible to reduce the loading time from six minutes to one minute and fifty seconds. Its own code calculates the length of the list of items only once, which already saves a considerable amount of calculations. In addition, he skips checking the hashes, because in his opinion there is no reason to check for duplicate items. This means that the almost two billion checks are no longer an issue, so that the processor finishes loading much faster.

The developer makes it clear that his own code has a proof of concept is and that its use and thus the modification of GTA Online can lead to the suspension of player accounts.

GTA Online Bikers-dlc

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.