djust 0.4.4

StableReleased
Install
pip install djust==0.4.4

djust 0.4.4 was stabilized through 1 pre-release, and most of its changes are recorded under them: 0.4.4rc1.

Changed

  • Remove double updateHooks()/bindModelElements() scanning — These were called in both applyPatches() and reinitAfterDOMUpdate(), scanning the full DOM twice per patch cycle. Removed from applyPatches(). Saves ~5ms per event.

  • Delegated scoped listeners (dj-window-, dj-document-) — Replaced querySelectorAll('*') full DOM scan with a registry-based delegation pattern. Scoped elements are scanned once at mount time and registered in a Map. Event listeners on window/document dispatch to the registry. Handles dotted attribute variants (dj-window-keydown.escape).

  • Use orjson.loads() for patch JSON parsing — 2-3x faster than stdlib json.loads() when orjson is installed. Falls back gracefully.

  • Gate debug payload behind panel open stateget_debug_update() (dir + getattr + json.dumps per attribute) only runs when the debug panel is actually open, not on every event in DEBUG mode. Saves ~2-5ms per event. Panel sends debug_panel_open/debug_panel_close WS messages on toggle.

All releases · Atom feed