this post was submitted on 05 Sep 2023
665 points (97.7% liked)

Piracy: ꜱᴀɪʟ ᴛʜᴇ ʜɪɢʜ ꜱᴇᴀꜱ

53370 readers
736 users here now

⚓ Dedicated to the discussion of digital piracy, including ethical problems and legal advancements.

Rules • Full Version

1. Posts must be related to the discussion of digital piracy

2. Don't request invites, trade, sell, or self-promote

3. Don't request or link to specific pirated titles, including DMs

4. Don't submit low-quality posts, be entitled, or harass others



Loot, Pillage, & Plunder


💰 Please help cover server costs.

Ko-FiLiberapay


founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 32 points 11 months ago (1 children)

Found an article that details it again since it was a fun read at the time. Looks like it was 10MB json file and the method to read the lines used the expensive length function you mentioned. It also had other simple optimizations too.

[–] [email protected] 7 points 11 months ago* (last edited 11 months ago) (1 children)

Pretty funny that because of all their microtransactions being stored in a JSON file being loaded into memory, that ended up making their game more slow and annoying and frustrating to play.

I am super curious if the devs knew about this issue but it just wasn't fixed because it wasn't given priority by management, or if the devs genuinely had no clue about this?

The even weirder and funnier thing is I've worked with larger JSON files day to day at my job with a much smaller scale than Rockstar/GTA, although I guess it depends on how you work with the files and the fact they were checking string lengths for literally every single piece of data etc.

[–] [email protected] 11 points 11 months ago* (last edited 11 months ago) (1 children)

The library used to read the line does the string length check, so my guess, whoever wrote it initially didn't know about it and tested with a small sunset of items without issue; I assume the games items grew in size over the years too. They also released an official patch with it and paid the modder $10k

Edit fixed typo

[–] [email protected] 1 points 11 months ago

Lol, in the meantime see what Nintendo does to modders who fix stuff for them