Autosave speed up and other improvements suggestion(s)

  • We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

itsuart

Major
39 Badges
May 24, 2014
501
507
  • Crusader Kings II
  • Victoria 2: A House Divided
  • Darkest Hour
  • Victoria 3 Sign Up
  • Shadowrun: Hong Kong
  • Shadowrun: Dragonfall
  • Shadowrun Returns
  • Stellaris: Distant Stars
  • Stellaris: Humanoids Species Pack
  • Age of Wonders III
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Tyranny: Archon Edition
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Stellaris
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Victoria 2
  • Europa Universalis IV
It appears we have quite a few experinced people on the forum, so please, join in :)

I'll start with:
* Don't do IO in main loop, copy (relevant) game state and spawn another thread to do serialization of the copy.
It'll complicate code, but I think it would be worth it. Just pay close attention to thread synchronization and IO failure handling.

* Use SQLite instead of your in-house file format for both Ironman and non-Ironman. (original suggestion by @penco)
That would
a) reduce code base
b) make life of 3rd party tools builders easier
c) You can always and easily expand it. Adding new tables and maybe relations is safe and doesn't cost you anything.