Performance

Measured numbers for the whole pipeline, per-integrity costs, autosave overhead, and where to reproduce them.

Advanced NexusForge Persistence 0.2.0 Updated

Measure on your hardware, treat these as shape#

Numbers were taken in the repository's environment — Editor, EditMode tests, in-memory storage, Unity 6000.6.0f1, Intel Core i9-14900K — over a representative model of 2000 objects producing a 91 KB document. They are printed by the Performance test category as [NF.Perf] <name>: <ms>, so you can reproduce them where it matters: Window → General → Test Runner → EditMode → right-click the Performance category → Run. Verified

MeasurementResult
Save, whole pipeline over in-memory storage3.01 ms
Load, whole pipeline4.65 ms
Save with CRC32 integrity3.72 ms
Save with SHA-256 integrity2.80 ms
Save with SHA-256 + Deflate2.41 ms (91 KB → 6.1 KB)
Save with SHA-256 + Deflate + AES-256-CBC/HMAC2.61 ms
Autosave Tick, idle game0.03 ms
Autosave MarkDirty0.03 ms

In an IL2CPP release player (real disk, read-back verification on, compression and encryption on):

MeasurementResult
Save a small model, cold18.7 ms for 1174 bytes
Save a 2000-entry model, warm25.9 ms
Load a 2000-entry model24.7 ms

What the numbers say#

  • Autosave is free when nothing changes. 0.03 ms per frame, and the test asserts that a long debounce produces no writes during the measurement, so it is real overhead rather than coincidence.
  • Compression often pays for itself. Deflate is faster end to end here, because a 15× smaller payload costs less to hash, encrypt and write.
  • The framework's plumbing is not the cost. Integrity, compression and encryption over 2000 objects are single-digit milliseconds; the term no library controls is the device's write throughput.
  • A player save costs more than an Editor save because it includes read-back verification and a backup copy on real storage — the two features that catch a bad write.

Should manual saves move off the calling thread?#

Partly, and only where it is safe. The projection cannot move; everything after it can. If your save is small, the default is right — an offload costs a thread-pool hop and buys nothing. If your save is large enough that the frame drops, turn on Storage.OffloadWritesToThreadPool and measure again with the category above.

Next#

Something wrong on this page? Every page here describes behaviour that is checked in the repository. If a page and the package disagree, the package wins.

Report a documentation problem · Frequently asked questions · Troubleshooting