Avoid root dirty delta for shared state events - #6841
harsh21234i wants to merge 16 commits into
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Merging this PR will degrade performance by 17.19%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | test_modify_state[linked] |
17.1 ms | 21.6 ms | -21.11% |
| ❌ | test_process_event[linked_1_client] |
15.8 ms | 19.5 ms | -18.92% |
| ❌ | test_process_event[linked] |
8.6 ms | 10.5 ms | -18.01% |
| ❌ | test_process_event[linked_8_clients] |
75.9 ms | 91.9 ms | -17.39% |
| ❌ | test_link_and_unlink[private] |
6.1 ms | 6.8 ms | -10.11% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing harsh21234i:fix/shared-state-root-dirty-6392 (078c9fd) with main (52d1c1c)
Footnotes
-
18 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
|
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
|
hey @masenf The state-dirty cleanup changes and regression tests are now implemented, including descendant cleanup when delta resolution fails. Most CI checks are passing, but reflex-install-and-init is failing. Could you confirm whether that failure is infrastructure-related or requires a code change? Once it passes, could you please review the latest commit? |
masenf
left a comment
There was a problem hiding this comment.
patch breaks delta calculation for computed vars in shared state that depend on root state.
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
|
hey @mansef could you please review the latest commit? |
12ba89d to
d4f64bc
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Summary
Tests
uv run --frozen pytest tests/units/test_state.py::test_linked_state_event_does_not_dirty_root_state -quv run --frozen pytest tests/units/test_state.py::test_linked_state_event_does_not_dirty_root_state tests/units/test_state.py::test_router_var_dep tests/units/test_state.py::test_computed_var_depends_on_parent_non_cached tests/units/test_state.py::test_async_computed_var_get_state -quv run --frozen pytest tests/units/test_state.py -quv run --frozen pre-commit run --files reflex/istate/shared.py tests/units/test_state.py news/6841.bugfix.mdCloses #6392