• seang96@spgrn.com
    link
    fedilink
    English
    arrow-up
    31
    ·
    1 year ago

    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.

    • ipkpjersi@lemmy.ml
      link
      fedilink
      English
      arrow-up
      7
      ·
      edit-2
      1 year ago

      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.