Jump to content

Update: Game now patched | Rockstar Games confirms major reductions to loading times coming to GTA Online thanks to a GTA modder

AlTech

I just got a 300mb+ update in steam (1.54) and it seems it took my online load screen from 5+ minutes to down to 2. Can someone else confirm?

mY sYsTeM iS Not pErfoRmInG aS gOOd As I sAW oN yOuTuBe. WhA t IS a GoOd FaN CuRVe??!!? wHat aRe tEh GoOd OvERclok SeTTinGS FoR My CaRd??  HoW CaN I foRcE my GpU to uSe 1o0%? BuT WiLL i HaVE Bo0tllEnEcKs? RyZEN dOeS NoT peRfORm BetTer wItH HiGhER sPEED RaM!!dId i WiN teH SiLiCON LotTerrYyOu ShoUlD dEsHrOuD uR GPUmy SYstEm iS UNDerPerforMiNg iN WarzONEcan mY Pc Run WiNdOwS 11 ?woUld BaKInG MY GRaPHics card fIX it? MultimETeR TeSTiNG!! aMd'S GpU DrIvErS aRe as goOD aS NviDia's YOU SHoUlD oVERCloCk yOUR ramS To 5000C18

Link to comment
Share on other sites

Link to post
Share on other sites

26 minutes ago, Levent said:

I just got a 300mb+ update in steam (1.54) and it seems it took my online load screen from 5+ minutes to down to 2. Can someone else confirm?

Looks like a launcher patch.

https://steamdb.info/depot/271591/

https://steamdb.info/depot/271592/

 

Nope, never mind. Can confirm this was the patch. Just got 35 second load time from Story Mode.

https://twitter.com/GTASeries/status/1371792213999562754

Edited by PorkishPig

Make sure to quote me or use @PorkishPig to notify me that you replied!

 

 

Desktop

CPU - Ryzen 9 3900X | Cooler - Noctua NH-D15 | Motherboard - ASUS TUF X570-PLUS RAM - Corsair Vengeance LPX DDR4-3200 32GB Case - Meshify C

GPU - RTX 3080 FE PSU - Straight Power 11 850W Platinum Storage - 980 PRO 1TB, 960 EVO 500GB, S31 1TB, MX500 500GB | OS - Windows 11 Pro

 

Homelab

CPU - Core i5-11400 | Cooler - Noctua NH-U12S | Motherboard - ASRock Z590M-ITX RAM - G.Skill Ripjaws V DDR4-3600 32GB (2x16)  | Case - Node 304

PSU - EVGA B3 650W | Storage - 860 EVO 256GB, Sabrent Rocket 4.0 1TB, WD Red 4TB (x6 in RAIDZ1 w/ LSI 9207-8i) | OS - TrueNAS Scale (Debian)

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, James Evens said:

@Silentprototipe Is it worse or on pair compared to his original patch?

About 5 seconds off the original creator's patch. R* practically bought that guy's code. 

 

28 minutes ago, WereCat said:

I stopped playing it because of that... and the awful UI. 

But I will give it another try once the update goes live. 

Lol dont, Ive racked up close to 3.5k hours in the past year and I would recommend people stay the hell away from it 

Primary Laptop (Gearsy MK4): Ryzen 9 5900HX, Radeon RX 6800M, Radeon Vega 8 Mobile, 24 GB DDR4 2400 Mhz, 512 GB SSD+1TB SSD, 15.6 in 300 Hz IPS display

2021 Asus ROG Strix G15 Advantage Edition

 

Secondary Laptop (Uni MK2): Ryzen 7 5800HS, Nvidia GTX 1650, Radeon Vega 8 Mobile, 16 GB DDR4 3200 Mhz, 512 GB SSD 

2021 Asus ROG Zephyrus G14 

 

Meme Machine (Uni MK1): Shintel Core i5 7200U, Nvidia GT 940MX, 24 GB DDR4 2133 Mhz, 256 GB SSD+500GB HDD, 15.6 in TN Display 

2016 Acer Aspire E5 575 

 

Retired Laptop (Gearsy MK2): Ryzen 5 2500U, Radeon Vega 8 Mobile, 12 GB 2400 Mhz DDR4, 256 GB NVME SSD, 15.6" 1080p IPS Touchscreen 

2017 HP Envy X360 15z (Ryzen)

 

PC (Gearsy): A6 3650, HD 6530D , 8 GB 1600 Mhz Kingston DDR3, Some Random Mobo Lol, EVGA 450W BT PSU, Stock Cooler, 128 GB Kingston SSD, 1 TB WD Blue 7200 RPM

HP P7 1234 (Yes It's Actually Called That)  RIP 

 

Also im happy to answer any Ryzen Mobile questions if anyone is interested! 

 

 

 

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Nice.

| Ryzen 7 7800X3D | AM5 B650 Aorus Elite AX | G.Skill Trident Z5 Neo RGB DDR5 32GB 6000MHz C30 | Sapphire PULSE Radeon RX 7900 XTX | Samsung 990 PRO 1TB with heatsink | Arctic Liquid Freezer II 360 | Seasonic Focus GX-850 | Lian Li Lanccool III | Mousepad: Skypad 3.0 XL / Zowie GTF-X | Mouse: Zowie S1-C | Keyboard: Ducky One 3 TKL (Cherry MX-Speed-Silver)Beyerdynamic MMX 300 (2nd Gen) | Acer XV272U | OS: Windows 11 |

Link to comment
Share on other sites

Link to post
Share on other sites

7 hours ago, Loote said:

Nintendo would probably sue him and do their best to make the patch impossible, props to Rockstar for giving him some compensation at least.

Rockstar are actually very chill towards modders (as long as you don't promote piracy/harm their online cash flow)

As a modder of GTA games myself i like the messages that rock star leaves in their source code:

; Author: Bill Henderson
; Created 10/12/1999
;
; > COMMENTS <
; ------------
; TWEAK AT YOUR OWN RISK
;
; > UNITS <
; ---------
; vehicle identifier 14 characters max
; dimensions in metres
; mass in Kg
; velocity in Km/h
; acceleration/deceleration in ms-2
; multipliers x1.0 is default
; angles in degrees
; Levels :- (L)ow, (M)edium, (H)igh
; buoyancy = percent submerged (> 100% vehicle sinks)
; engine type :- (P)etrol, (D)iesel, (E)lectric
; engine drive :- (F)ront, (R)ear, (4)-wheel drive

That's from the source code of GTA San Andreas,this is part of a code that is responsible for vehicle handling,

With detailed explanation by the programmer (Thanks Bill Henderson!) of what everything does.

 

By the way,Bill Henderson is now working at Epic Games.

A PC Enthusiast since 2011
AMD Ryzen 7 5700X@4.65GHz | GIGABYTE GTX 1660 GAMING OC @ Core 2085MHz Memory 5000MHz
Cinebench R23: 15669cb | Unigine Superposition 1080p Extreme: 3566
Link to comment
Share on other sites

Link to post
Share on other sites

5 hours ago, RejZoR said:

When some random Anon on the interwebs makes loading times 70% shorter. Something that makers of the game and game engine itself couldn't somehow. I HAVE QUESTIONS...

Not only that, but without the source code, and with pure reverse engineering.

 

Just goes to show how optimizing hot code paths is always a great idea (it was a simple parsing inefficiency + comparing every single entry vs using a hash map). I guess loading time is less important than polish when you're in the last crunch before release but still. 

 

Also could the author please link the amazing blog post by the hacker? (https://nee.lv/2021/02/28/How-I-cut-GTA-Online-loading-times-by-70/)

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, James Evens said:

There was not much to code. Either they just took it or let the intern write it during the coffee break.

 

Largest part of this was getting to the point which causes the problem. I still don't get why nobody at rockstar ever though about doing it. They even have the source code.

 

Rockstar are a bunch of apes in a coding warehouse when it comes to patching anything in this game. So many day 1 glitches that ive seen that are still in the game despite being well known. This time however it was so blatently bad that R* finally did something 

Primary Laptop (Gearsy MK4): Ryzen 9 5900HX, Radeon RX 6800M, Radeon Vega 8 Mobile, 24 GB DDR4 2400 Mhz, 512 GB SSD+1TB SSD, 15.6 in 300 Hz IPS display

2021 Asus ROG Strix G15 Advantage Edition

 

Secondary Laptop (Uni MK2): Ryzen 7 5800HS, Nvidia GTX 1650, Radeon Vega 8 Mobile, 16 GB DDR4 3200 Mhz, 512 GB SSD 

2021 Asus ROG Zephyrus G14 

 

Meme Machine (Uni MK1): Shintel Core i5 7200U, Nvidia GT 940MX, 24 GB DDR4 2133 Mhz, 256 GB SSD+500GB HDD, 15.6 in TN Display 

2016 Acer Aspire E5 575 

 

Retired Laptop (Gearsy MK2): Ryzen 5 2500U, Radeon Vega 8 Mobile, 12 GB 2400 Mhz DDR4, 256 GB NVME SSD, 15.6" 1080p IPS Touchscreen 

2017 HP Envy X360 15z (Ryzen)

 

PC (Gearsy): A6 3650, HD 6530D , 8 GB 1600 Mhz Kingston DDR3, Some Random Mobo Lol, EVGA 450W BT PSU, Stock Cooler, 128 GB Kingston SSD, 1 TB WD Blue 7200 RPM

HP P7 1234 (Yes It's Actually Called That)  RIP 

 

Also im happy to answer any Ryzen Mobile questions if anyone is interested! 

 

 

 

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

23 hours ago, AluminiumTech said:

Rockstar Games have said they will incorporate the fix into a new update coming soon to GTA Online and have compensated the modder for his work. 

Wow that's really unexpected!

 

  

12 hours ago, BuckGup said:

So everyone working at Rockstar never took a Computer Science class in their life? 

The people that did had more important things to work on. This was clearly done by the marketing "devs" that probably shouldn't even be allowed near a computer.

Link to comment
Share on other sites

Link to post
Share on other sites

12 hours ago, BuckGup said:

So everyone working at Rockstar never took a Computer Science class in their life? 

 

Well, I think it was probably one person who implemented things (likely with a smaller JSON file) and no one decided to check what was causing the long load times after development.  After all, the big mistake was pretty simple, that I think a decent amount of CS people would miss.  Using sscanf multiple times on a 12MB string...the issue is that sscanf essentially does something similar to strlen which scans the entire string (despite the fact that logically sscanf shouldn't need to know the string length).

 

The hashmap one, I can't really make any excuses there though...especially given that they only appear to use it on the single JSON file (by the sounds of it) and there aren't any duplicate entries in the JSON file.

3735928559 - Beware of the dead beef

Link to comment
Share on other sites

Link to post
Share on other sites

17 hours ago, PorkishPig said:

Looks like a launcher patch.

https://steamdb.info/depot/271591/

https://steamdb.info/depot/271592/

 

Nope, never mind. Can confirm this was the patch. Just got 35 second load time from Story Mode.

https://twitter.com/GTASeries/status/1371792213999562754

 

17 hours ago, Levent said:

I just got a 300mb+ update in steam (1.54) and it seems it took my online load screen from 5+ minutes to down to 2. Can someone else confirm?


It looks like it has been added in GTA Online Title Update 1.53 with Rockstar providing credit where credit is due in the patch notes . I’ve updated the Original post with this as well.

 

https://support.rockstargames.com/articles/360061161574/GTAV-Title-Update-1-53-Notes-PS4-Xbox-One-PC

Judge a product on its own merits AND the company that made it.

How to setup MSI Afterburner OSD | How to make your AMD Radeon GPU more efficient with Radeon Chill | (Probably) Why LMG Merch shipping to the EU is expensive

Oneplus 6 (Early 2023 to present) | HP Envy 15" x360 R7 5700U (Mid 2021 to present) | Steam Deck (Late 2022 to present)

 

Mid 2023 AlTech Desktop Refresh - AMD R7 5800X (Mid 2023), XFX Radeon RX 6700XT MBA (Mid 2021), MSI X370 Gaming Pro Carbon (Early 2018), 32GB DDR4-3200 (16GB x2) (Mid 2022

Noctua NH-D15 (Early 2021), Corsair MP510 1.92TB NVMe SSD (Mid 2020), beQuiet Pure Wings 2 140mm x2 & 120mm x1 (Mid 2023),

Link to comment
Share on other sites

Link to post
Share on other sites

17 hours ago, RejZoR said:

When some random Anon on the interwebs makes loading times 70% shorter. Something that makers of the game and game engine itself couldn't somehow. I HAVE QUESTIONS...

To solve a problem, you not only need to be looking to solve it and be looking in the right place. Loading screen time was likely a very low priority problem.. It's loading? Good, next issue....  And lots of times people very familiar with the system like the makers don't think to look at what can be obvious to an outsider. Especially if the system they're using works in other games as is.

🖥️ Motherboard: MSI A320M PRO-VH PLUS  ** Processor: AMD Ryzen 2600 3.4 GHz ** Video Card: Nvidia GeForce 1070 TI 8GB Zotac 1070ti 🖥️
🖥️ Memory: 32GB DDR4 2400  ** Power Supply: 650 Watts Power Supply Thermaltake +80 Bronze Thermaltake PSU 🖥️

🍎 2012 iMac i7 27";  2007 MBP 2.2 GHZ; Power Mac G5 Dual 2GHZ; B&W G3; Quadra 650; Mac SE 🍎

🍎 iPad Air2; iPhone SE 2020; iPhone 5s; AppleTV 4k 🍎

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Video Beagle said:

To solve a problem, you not only need to be looking to solve it and be looking in the right place. Loading screen time was likely a very low priority problem.. It's loading? Good, next issue....  And lots of times people very familiar with the system like the makers don't think to look at what can be obvious to an outsider. Especially if the system they're using works in other games as is.

It's not a low priority when you're sitting around for 5 minutes on high(er) end systems. Like, come on?

Link to comment
Share on other sites

Link to post
Share on other sites

For those that don't know how this fix reduced the loading time...

 

There were two problems.

 

The game downloads a JSON file (kind of a TEXT file with a specific structure) with around 60 k of items available in game and their price and some information about them, every time you go online.  That file is currently UP to around 10 MB in size.

When they made the game and tested the code, there weren't so many game items, they probably had only a few hundred, and maybe less than 1 MB in size for that file. 

 

The game code uses a single cpu core, a single thread, to parse (to read the json file sequentially) and take every game item and its information and put it in memory in a list of items. 

They probably used a ready made JSON parsing library (some code made by someone else) which was badly written, as in every time a small piece of information from the JSON file was decoded  (a property of a game item), that library was calling a function to find out the whole size of the json file .. so for each of those 60k game items, the library was asking how big the file is maybe 10-20 times, and that function took time to actually determine how big the file is. 

 

So it's quite possible when they first made and released the game, the problem wasn't noticeable, because the third party library worked well with small JSON files .... but it's increased exponentially with very big files.

And by that time it got seriously slow, probably developers already moved to making red dead redemption or this was considered a low priority bug  or a bug that wasn't worth releasing a full patch / update (microsoft and sony made you pay to release updates if you did too many) 

 

 

One a game item and its properties were extracted from the JSON file, it's put in a list. But, the game code actually checks all the previously game items added to the list to see if the game item wasn't already added to the list.

So for 2nd item, game checks item 1 and compares with the new item. For 3rd item .. game checks items 1 and 2 already in the list. For 100 item, game checks items 1 to 99 ... so you can see that when you get to game item 63,000  ... you check items 1 to 63000 .... so during this load the game keeps checking millions of times if each game item was added to the list already or not

 

They could have fixed the game in maybe 1 hour by changing from json to a different format which can be parsed without having to determine file lengths and crap like that. 

They could have used hashes or unique identifiers for each game item so that when a new game item is added, the code doesn't have to check all previous 60k game items to see if they're unique or not. 

 

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, mariushm said:

That file is currently UP to around 10 MB in size.

When they made the game and tested the code, there weren't so many game items, they probably had only a few hundred, and maybe less than 1 MB in size for that file.

I was wondering if it was something like that....a function that was fine in the early days but as the game proceeded was uneffecient for the task.

🖥️ Motherboard: MSI A320M PRO-VH PLUS  ** Processor: AMD Ryzen 2600 3.4 GHz ** Video Card: Nvidia GeForce 1070 TI 8GB Zotac 1070ti 🖥️
🖥️ Memory: 32GB DDR4 2400  ** Power Supply: 650 Watts Power Supply Thermaltake +80 Bronze Thermaltake PSU 🖥️

🍎 2012 iMac i7 27";  2007 MBP 2.2 GHZ; Power Mac G5 Dual 2GHZ; B&W G3; Quadra 650; Mac SE 🍎

🍎 iPad Air2; iPhone SE 2020; iPhone 5s; AppleTV 4k 🍎

Link to comment
Share on other sites

Link to post
Share on other sites

That's just dumb design which you certainly wouldn't expect from AAA developer like Rockstar...

Link to comment
Share on other sites

Link to post
Share on other sites

6 minutes ago, Video Beagle said:

To solve a problem, you not only need to be looking to solve it and be looking in the right place. Loading screen time was likely a very low priority problem.. It's loading? Good, next issue....  And lots of times people very familiar with the system like the makers don't think to look at what can be obvious to an outsider. Especially if the system they're using works in other games as is.

Thats called creation/creator bias and yep, its a HUGE issue in loads of different areas.

 

Level design is one example, the person that created the level already knows the intended solution since they created the problem and while testing will, more often than not, miss glaringly obvious problems (these days commonly called cheese) simply because they're focus is entirely on whether the intended solution works as they intended it to.

 

This is why level creation teams will spend hours play testing each others levels and get people from outside the team to also play them. The more eyes you can get on something before it goes live the more chance you have of picking up problems.

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Master Disaster said:

Thats called creation/creator bias and yep, its a HUGE issue in loads of different areas.

Hell, you see it in non technical things with just proof reading. You know what you meant to type, so you don't see the error no matter how many times you go over it.  (I've had that from both the writer and the editor's side :D) .

 

🖥️ Motherboard: MSI A320M PRO-VH PLUS  ** Processor: AMD Ryzen 2600 3.4 GHz ** Video Card: Nvidia GeForce 1070 TI 8GB Zotac 1070ti 🖥️
🖥️ Memory: 32GB DDR4 2400  ** Power Supply: 650 Watts Power Supply Thermaltake +80 Bronze Thermaltake PSU 🖥️

🍎 2012 iMac i7 27";  2007 MBP 2.2 GHZ; Power Mac G5 Dual 2GHZ; B&W G3; Quadra 650; Mac SE 🍎

🍎 iPad Air2; iPhone SE 2020; iPhone 5s; AppleTV 4k 🍎

Link to comment
Share on other sites

Link to post
Share on other sites

On 3/17/2021 at 1:42 AM, mariushm said:

For those that don't know how this fix reduced the loading time...

 

There were two problems.

 

The game downloads a JSON file (kind of a TEXT file with a specific structure) with around 60 k of items available in game and their price and some information about them, every time you go online.  That file is currently UP to around 10 MB in size.

When they made the game and tested the code, there weren't so many game items, they probably had only a few hundred, and maybe less than 1 MB in size for that file. 

 

 

Sounds like the problem was that they used JSON at all. It was probably generated from some php or node.js script on the server.

 

JSON is Fine when you deal largely with one-thing-per-file. It’s awful as an an analog for a data table, because you don’t have any of the features that even SQLite has.

 

it’s likely all that was needed to fix this loading problem was to rewrite the parsing library to load the file into RAM, then do operations on it rather than one key pair at a time.

 

I’ve seen similar problems with games ported from CJK languages, where because English is three times longer to parse, the rendering code was dragging down the game anytime there was text on the screen.

 

TEXT processing tends to be the thing programmers are naive about.

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, Kisai said:

Sounds like the problem was that they used JSON at all. It was probably generated from some php or node.js script on the server.

 

JSON is Fine when you deal largely with one-thing-per-file. It’s awful as an an analog for a data table, because you don’t have any of the features that even SQLite has.

 

it’s likely all that was needed to fix this loading problem was to rewrite the parsing library to load the file into RAM, then do operations on it rather than one key pair at a time.

 

I’ve seen similar problems with games ported from CJK languages, where because English is three times longer to parse, the rendering code was dragging down the game anytime there was text on the screen.

 

TEXT processing tends to be the thing programmers are naive about.

Or just have the game servers serve the JSON file in an alternative format  - like for example UBJSON  : https://ubjson.org/

 - and then patch the game to request the new format and fall back to json if new format doesn't work ... unpatched games can continue to request json.

 

UBJSON 100% reversible but has the benefit of not having to parse text and count lengths  because you have the lengths specified for each thing ...

for example


 
{
  "login": "octocat",
  "id": 1,
  "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  "gravatar_id": "somehexcode",
  "url": "https://api.github.com/users/octocat",
  "name": "monalisa octocat",
  "company": "GitHub",
  "blog": "https://github.com/blog",
  "location": "San Francisco"
 }

 

You need to skip everything until you find the first " , then go character by character until the next " , then look for  " : " , then parse the values etc ... that's why those scanfs and whatever else keep checking the string length...

 

The above looks like this in ubjson ( where each number between [ ]  is 1 byte, 2 bytes or 4 bytes depending on data type specified in front of that.

 

[{]
    [i][5][login][S][i][7][octocat]
    [i][2][id][i][1]
    [i][10][avatar_url][S][i][49][https://github.com/images/error/octocat_happy.gif]
    [i][11][gravatar_id][S][i][11][somehexcode]
    [i][3][url][S][i][36][https://api.github.com/users/octocat]
    [i][4][name][S][i][16][monalisa octocat]
    [i][7][company][S][i][6][GitHub]
    [i][4][blog][S][i][23][https://github.com/blog]
    [i][8][location][S][i][13][San Francisco]
[}]

 

and if someone is paranoid, they could add a CRC16 or CRC32 after every record or at the end of the whole ubjson ( a 10 MB file with 63300 records ... around 160-180 characters per record.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×