Avatar for the reflex-dev user
reflex-dev
reflex
BlogDocsChangelog

refactor: freeze components after create and use copy_with for mutations

#6468
Comparing
FarhanAliRaza:immutability
(
37da3ed
) with
main
(
23029ac
)
CodSpeed Performance Gauge
+3%
Improvement
2
Untouched
22
Skipped
2

Benchmarks

26 total
test_evaluate_page_single_pass[_complicated_page]
tests/benchmarks/test_evaluate.py
CodSpeed Performance Gauge
+3%
39.7 ms38.4 ms
test_evaluate_page[_complicated_page]
tests/benchmarks/test_evaluate.py
CodSpeed Performance Gauge
+3%
38.8 ms37.6 ms
test_evaluate_page_single_pass[_stateful_page]
tests/benchmarks/test_evaluate.py
CodSpeed Performance Gauge
+3%
7.3 ms7.1 ms
test_evaluate_page[_stateful_page]
tests/benchmarks/test_evaluate.py
CodSpeed Performance Gauge
+3%
6.5 ms6.3 ms
test_get_all_imports_single_pass[_complicated_page]
tests/benchmarks/test_compilation.py
CodSpeed Performance Gauge
+2%
1.6 ms1.5 ms
test_get_all_imports_single_pass[_stateful_page]
tests/benchmarks/test_compilation.py
CodSpeed Performance Gauge
+2%
449.2 µs441.6 µs
test_get_all_imports[_stateful_page]
tests/benchmarks/test_compilation.py
CodSpeed Performance Gauge
+1%
554.1 µs548.4 µs
test_compile_page[_stateful_page]
tests/benchmarks/test_compilation.py
CodSpeed Performance Gauge
0%
1.7 ms1.7 ms
test_from_event_type[lambda_event]
tests/benchmarks/test_event_creation.py
CodSpeed Performance Gauge
0%
29.2 µs29.1 µs
test_from_event_type[event]
tests/benchmarks/test_event_creation.py
CodSpeed Performance Gauge
0%
29.4 µs29.4 µs
test_compile_page[_complicated_page]
tests/benchmarks/test_compilation.py
CodSpeed Performance Gauge
0%
8.4 ms8.4 ms
test_get_all_imports[_complicated_page]
tests/benchmarks/test_compilation.py
CodSpeed Performance Gauge
0%
2.8 ms2.8 ms
test_from_event_type[event_spec]
tests/benchmarks/test_event_creation.py
CodSpeed Performance Gauge
0%
52.6 µs52.6 µs
test_from_event_type[lambda_event_spec]
tests/benchmarks/test_event_creation.py
CodSpeed Performance Gauge
0%
54.5 µs54.5 µs
test_process_event
tests/benchmarks/test_event_processing.py
CodSpeed Performance Gauge
0%
7.5 ms7.5 ms
test_console_log
tests/benchmarks/test_event_creation.py
CodSpeed Performance Gauge
-1%
425.2 µs427.5 µs
test_compile_page_full_context[_complicated_page]
tests/benchmarks/test_compilation.py
CodSpeed Performance Gauge
-1%
139.3 ms140.2 ms
test_from_event_type[lambda_event_handler]
tests/benchmarks/test_event_creation.py
CodSpeed Performance Gauge
-1%
99.6 µs100.3 µs
test_from_event_type[event_handler]
tests/benchmarks/test_event_creation.py
CodSpeed Performance Gauge
-1%
97.3 µs98.2 µs
test_compile_page_full_context[_stateful_page]
tests/benchmarks/test_compilation.py
CodSpeed Performance Gauge
-1%
35.5 ms35.9 ms
test_compile_page_single_pass[_stateful_page]
tests/benchmarks/test_compilation.py
CodSpeed Performance Gauge
-2%
32.7 ms33.4 ms
test_compile_single_pass_all_artifacts[_stateful_page]
tests/benchmarks/test_compilation.py
CodSpeed Performance Gauge
-2%
29.2 ms29.8 ms
test_compile_page_single_pass[_complicated_page]
tests/benchmarks/test_compilation.py
CodSpeed Performance Gauge
-2%
131.2 ms134.3 ms
test_compile_single_pass_all_artifacts[_complicated_page]
tests/benchmarks/test_compilation.py
CodSpeed Performance Gauge
-3%
81.5 ms84 ms
test_compile_stateful[_stateful_page]
tests/benchmarks/test_compilation.py
Skipped
147.9 µs*

Commits

Click on a commit to change the comparison range
Base
main
23029ac
-28.78%
Merge remote-tracking branch 'upstream/main' into immutability
41e141c
7 days ago
by FarhanAliRaza
+32.59%
perf: speed up Component construction hot path
d1d22c5
7 days ago
by FarhanAliRaza
-0.13%
fix: preserve empty event_triggers dict and rename shadowed field var
78f1602
7 days ago
by FarhanAliRaza
-6.73%
refactor: inline style merge into Component and tidy copy_with paths
15d40a3
3 days ago
by FarhanAliRaza
+6.26%
refactor: accept Sequence in passthrough_children_var for broader call sites
37da3ed
3 days ago
by FarhanAliRaza
© 2026 CodSpeed Technology
Home Terms Privacy Docs