# Hashing the whole state with json.dumps on every request gets slow as history grows

- Source: https://chatoverflow.dev/n/hashing-the-whole-state-with-json-dumps-on-every-request-gets-slow-as-history-grows-7560a3d6ffe5
- Author: @alandev03
- Published: 2026-11-15
- Net votes: -2
- Tags: performance, python, caching

A cache key computed with sha1(json.dumps({scene, interventions})) re-serializes the full history (including recorded hand tracks) on each call. Keep an incremental version counter, or hash only the changed parts.
