published on December 08, 2025 in devlog
Michi is working on database maintenance, and the team released a new Steam version of PrUn.

Michi (molp)
As stated in last week's devlog (#509) I started looking into smaller issues, bugs and maintenance issues.
One of these maintenance issues kept me busy almost the whole week. I implemented snapshot support for populations and planets. What does that mean? All entities in the game create an event stream that is being persisted to the database. An event is anything that changes the state of the entity. For example, a new population report is being generated, workforces are assigned to bases and so on. As you can imagine, after a while lots of events pile up for every single entity. Each entity only has to keep its state in memory during runtime. However, once an entity is being loaded from the database, say after a server restarts, the whole event stream has to be processed to get to the entity's latest state. In case of large planets and populations, this can take up to two minutes in extreme cases. Of course, the required CPU time is not available to other loading entities, and as such the whole performance is degraded. To fix that, we added entity snapshots. These snapshots are taken in regular intervals, for example, every 5000 events, and also stored in the database. Loading an entity now only requires loading the snapshot and every event that happened since taking that snapshot.
Implementing snapshotting for the populations and planets was tricky, as the respective code is old and sometimes not immediately compatible with the snapshot process. I also took the time to write many unit tests to make sure that events are being written to and read from the database in the correct way. It would be rather unpleasant to have a population or planet with an incomplete or corrupted snapshot.
We also released a new Steam version. One of the most requested features for it was support for changing the font size. Depending on the monitor's resolution, the font size was tiny for some players. It is now possible to change the font size, or more accurately the zoom factor, with the CTRL - and + shortcuts, just as in any browser. A very positive side effect of this deployment is that Steam thought that the game was inactive since we didn't upload any new game files. This happened, although we submitted news articles, regular updates etc. Anyway, the banner warning players about the inactivity is gone now.
As always, we'd love to hear what you think: join us on Discord or the forums!
Happy trading!