I cut GTA Online loading times by 70% (2021)
20 hours ago
- #GTA Online
- #Game Development
- #Performance Optimization
- The author identified that GTA Online loading times were extremely slow, with online mode taking around 6 minutes compared to 1 minute 10 seconds for story mode.
- Investigation revealed that the slow loading was due to a CPU bottleneck in a single thread, where the game maxed out a core while parsing a 10 MB JSON file with about 63,000 entries.
- The JSON parser used inefficient functions like sscanf and strlen, leading to performance issues, and there was an unnecessary O(n^2) duplicate check on items, despite all items being unique.
- The author created a proof-of-concept (PoC) to optimize loading by caching strlen results and bypassing duplicate checks, reducing load times by over 70%, from 6 minutes to 1 minute 50 seconds.
- Rockstar acknowledged the issue, provided a fix in an update, and awarded the author a $10,000 bounty for identifying and addressing the problem.