Commit Graph

7 Commits

Author SHA1 Message Date
Sylvessa
207a1b309f optimization: async dedicated server autosaving (#1473) 2026-04-05 16:17:01 -05:00
itsRevela
207d90de28 perf: process 16 chunks/player/tick on dedicated server, revert async save
Chunk loading now batches up to 16 nearest-first requests per player per
tick on dedicated server (client stays at 1), improving tick recovery
time after player join.

Reverts the async save system -- the background thread snapshot/compress
path added complexity without measurable benefit. Autosave on Windows64
server now uses the standard synchronous flush like client, in
preparation for a proper async implementation from upstream.
2026-04-05 15:56:39 -05:00
itsRevela
073a511217 perf: async autosave for dedicated server
Autosave previously froze the main thread for 2-6 seconds while
compressing the entire save file with zlib. Now the save buffer is
snapshotted under the lock (~18ms), then compression runs on a
background thread. The compressed data is committed to StorageManager
on the next main-thread tick via CommitPendingAsyncSave().

Also skip redundant full chunk saves during autosave on the dedicated
server -- chunks are already persisted by the per-tick trickle save.
Only entity data is flushed, matching Xbox/Orbis behavior.

Added per-step timing to the autosave handler for diagnostics.
2026-03-31 23:33:21 -05:00
ModMaker101
28614b922f Modernize project codebase (#906)
* Fixed boats falling and a TP glitch #266

* Replaced every C-style cast with C++ ones

* Replaced every C-style cast with C++ ones

* Fixed boats falling and a TP glitch #266

* Updated NULL to nullptr and fixing some type issues

* Modernized and fixed a few bugs

- Replaced most instances of `NULL` with `nullptr`.
- Replaced most `shared_ptr(new ...)` with `make_shared`.
- Removed the `nullptr` macro as it was interfering with the actual nullptr keyword in some instances.

* Fixing more conflicts

* Replace int loops with size_t and start work on overrides

* Add safety checks and fix a issue with vector going OOR
2026-03-08 18:08:36 -05:00
Loki Rautio
087b7e7abf Revert "Project modernization (#630)"
This code was not tested and breaks in Release builds, reverting to restore
functionality of the nightly. All in-game menus do not work and generating
a world crashes.

This reverts commit a9be52c41a.
2026-03-07 21:12:22 -06:00
ModMaker101
a9be52c41a Project modernization (#630)
* Fixed boats falling and a TP glitch #266

* Replaced every C-style cast with C++ ones

* Replaced every C-style cast with C++ ones

* Fixed boats falling and a TP glitch #266

* Updated NULL to nullptr and fixing some type issues

* Modernized and fixed a few bugs

- Replaced most instances of `NULL` with `nullptr`.
- Replaced most `shared_ptr(new ...)` with `make_shared`.
- Removed the `nullptr` macro as it was interfering with the actual nullptr keyword in some instances.

* Fixing more conflicts

* Replace int loops with size_t and start work on overrides
2026-03-08 09:56:03 +07:00
daoge_cmd
b691c43c44 Initial commit 2026-03-01 12:16:08 +08:00