imaginary-cherry
rapyer
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
[cascade-update-sf-pr] - test(02-04): real-Redis :6370 public-API proof for SF-only cascade parents - Test A/C: asave() on CascadeSetRefParent/CascadePQRefParent re-arms an SF-held child's own Meta.ttl through the public save path - Test B: aset_ttl(ttl, cascade=True) re-arms the child directly, returning a CascadeResult with dangling_children=0 - No _apply_cascade/run_fcall helper used anywhere in this file -- proves the fix through the literal public API (asave/aset_ttl), closing CASF-04/05/06 end-to-end (02-01 proved reach only at the direct-FCALL level)
gsd/cascade-update-sf-pr
3 days ago
Merge pull request #288 from imaginary-cherry/gsd/ttl-codspeed-regression perf(cascade): fix bulk-insert-with-TTL regression (v1.3.4)
develop
4 days ago
[ttl-codspeed-regression] - perf(cascade): fix bulk-insert-with-TTL regression v1.3.4's cascade-TTL milestone made refresh_ttl/aset_ttl always issue a per-model cascade FCALL on real Redis instead of a plain pipe.expire. Since ainsert auto-refreshes TTL per result model, bulk-inserting N models with no ForeignKey fields paid N heavier FCALLs -- pure overhead -- which regressed the *Many/*MixedClasses _with_ttl benchmarks ~13% while single insert did not. Gate the native-EXPIRE fast path on the _relational_field_names / _contain_fk sets that __init_subclass__ already populates: a model with no FK fields takes the plain pipe.expire path, and any model that has FK fields defers to the cascade function (which no-ops when its plan carries no enabled edges). Genuine cascade roots are unchanged -- still atomic, server-side, cycle/depth guards intact. No new class variable, no cache, no cross-module import cycle. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
gsd/ttl-codspeed-regression
4 days ago
[ttl-codspeed-regression] - perf(cascade): fix bulk-insert-with-TTL regression v1.3.4's cascade-TTL milestone made refresh_ttl/aset_ttl always issue a per-model cascade FCALL on real Redis instead of a plain pipe.expire. Since ainsert auto-refreshes TTL per result model, bulk-inserting N models with no ForeignKey fields paid N heavier FCALLs -- pure overhead -- which regressed the *Many/*MixedClasses _with_ttl benchmarks ~13% while single insert did not. Gate the native-EXPIRE fast path on the _relational_field_names / _contain_fk sets that __init_subclass__ already populates: a model with no FK fields takes the plain pipe.expire path, and any model that has FK fields defers to the cascade function (which no-ops when its plan carries no enabled edges). Genuine cascade roots are unchanged -- still atomic, server-side, cycle/depth guards intact. No new class variable, no cache, no cross-module import cycle. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
gsd/ttl-codspeed-regression
5 days ago
[ttl-codspeed-regression] - [ttl-codspeed-regression] - perf(cascade): fix bulk-insert-with-TTL regression v1.3.4's cascade-TTL milestone made refresh_ttl/aset_ttl always issue a per-model cascade FCALL on real Redis instead of a plain pipe.expire. Since ainsert auto-refreshes TTL per result model, bulk-inserting N models with no ForeignKey fields paid N heavier FCALLs -- pure overhead -- which regressed the *Many/*MixedClasses _with_ttl benchmarks ~13% while single insert did not. Gate the native-EXPIRE fast path on the _relational_field_names / _contain_fk sets that __init_subclass__ already populates: a model with no FK fields takes the plain pipe.expire path, and any model that has FK fields defers to the cascade function (which no-ops when its plan carries no enabled edges). Genuine cascade roots are unchanged -- still atomic, server-side, cycle/depth guards intact. No new class variable, no cache, no cross-module import cycle. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
gsd/ttl-codspeed-regression
5 days ago
[ttl-codspeed-regression] - perf(cascade): fix bulk-insert-with-TTL regression v1.3.4's cascade-TTL milestone made refresh_ttl/aset_ttl always issue a per-model cascade FCALL on real Redis instead of a plain pipe.expire. Since ainsert auto-refreshes TTL per result model, bulk-inserting N models with no ForeignKey fields paid N heavier FCALLs -- pure overhead -- which regressed the *Many/*MixedClasses _with_ttl benchmarks ~13% while single insert did not. Gate the native-EXPIRE fast path on the _relational_field_names / _contain_fk sets that __init_subclass__ already populates: a model with no FK fields takes the plain pipe.expire path, and any model that has FK fields defers to the cascade function (which no-ops when its plan carries no enabled edges). Genuine cascade roots are unchanged -- still atomic, server-side, cycle/depth guards intact. No new class variable, no cache, no cross-module import cycle. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
gsd/ttl-codspeed-regression
5 days ago
[ttl-codspeed-regression] - refactor(cascade): memoize cascade-edge check instead of a model ClassVar Replace the _has_cascade_edges ClassVar (plus its init_rapyer assignment and the __dict__-based lazy resolution) with a functools.lru_cache on the pure planner helper model_has_cascade_edges(). build_cascade_plan and the helper call the identical _static_walk_fk_edges, so the init-time value was always equal to the lazily-computed one -- the ClassVar was pure memoization. The cache keeps the per-model walk O(1) after first use, preserving the bulk-insert perf fix while storing no state on the model class. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
gsd/ttl-codspeed-regression
5 days ago
[ttl-codspeed-regression] - perf(cascade): gate TTL-cascade FCALL on _has_cascade_edges to fix bulk-insert regression The v1.3.4 cascade-TTL milestone rewrote refresh_ttl/aset_ttl to always invoke a per-model FCALL of the cascade Redis Function on real Redis, replacing the plain per-key pipe.expire. ainsert auto-refreshes TTL on every result model, so bulk insert of N models issued N FCALLs instead of N EXPIREs. FCALL is materially heavier than a native EXPIRE and scales per model, so only the *Many/*MixedClasses _with_ttl benchmarks regressed (~13% on CodSpeed) while single insert did not. The inserted models have no ForeignKey fields, so the cascade walk was pure overhead. Gate the FCALL on a new per-model _has_cascade_edges flag: refresh_ttl and aset_ttl take the pre-v1.3.4 native pipe.expire(all_keys) fast path whenever a model has no cascade-enabled outgoing FK edges, and only issue the cascade function when there is a graph to walk. The flag is set authoritatively by init_rapyer from the built cascade plan; when unset (pre-init / unit tests) it resolves lazily and statically via the new planner helper model_has_cascade_edges(). Genuine cascade models are unchanged: still FCALL, still atomic/server-side, cycle+depth guards intact. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
gsd/ttl-codspeed-regression
7 days ago
Latest Branches
CodSpeed Performance Gauge
-1%
v1.3.6: Cascade reach through special-field references (RedisSet/RedisPriorityQueue of ForeignKey)
#289
3 days ago
268a9eb
gsd/cascade-update-sf-pr
CodSpeed Performance Gauge
+14%
Version 1.3.4
#287
4 days ago
67943eb
develop
CodSpeed Performance Gauge
+12%
perf(cascade): fix bulk-insert-with-TTL regression (v1.3.4)
#288
5 days ago
e2ac3e2
gsd/ttl-codspeed-regression
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs