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
(
78f1602
) with
main
(
2df5344
)
CodSpeed Performance Gauge
+4%
Improvement
1
Untouched
23
Skipped
2

Benchmarks

26 total
test_get_all_imports_single_pass[_complicated_page]
tests/benchmarks/test_compilation.py
CodSpeed Performance Gauge
+4%
1.6 ms1.5 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_single_pass[_complicated_page]
tests/benchmarks/test_evaluate.py
CodSpeed Performance Gauge
+3%
39.7 ms38.6 ms
test_evaluate_page[_complicated_page]
tests/benchmarks/test_evaluate.py
CodSpeed Performance Gauge
+3%
38.8 ms37.8 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[_stateful_page]
tests/benchmarks/test_compilation.py
CodSpeed Performance Gauge
+2%
449.4 µs441.9 µs
test_compile_page[_stateful_page]
tests/benchmarks/test_compilation.py
CodSpeed Performance Gauge
0%
1.7 ms1.7 ms
test_compile_page[_complicated_page]
tests/benchmarks/test_compilation.py
CodSpeed Performance Gauge
0%
8.4 ms8.4 ms
test_get_all_imports[_stateful_page]
tests/benchmarks/test_compilation.py
CodSpeed Performance Gauge
0%
550.8 µs550.5 µs
test_from_event_type[lambda_event_handler]
tests/benchmarks/test_event_creation.py
CodSpeed Performance Gauge
0%
99.5 µs99.6 µs
test_from_event_type[event_handler]
tests/benchmarks/test_event_creation.py
CodSpeed Performance Gauge
0%
97.1 µs97.2 µs
test_compile_page_full_context[_complicated_page]
tests/benchmarks/test_compilation.py
CodSpeed Performance Gauge
0%
139.7 ms139.9 ms
test_from_event_type[lambda_event_spec]
tests/benchmarks/test_event_creation.py
CodSpeed Performance Gauge
0%
54.5 µs54.6 µs
test_process_event
tests/benchmarks/test_event_processing.py
CodSpeed Performance Gauge
0%
7.5 ms7.5 ms
test_from_event_type[event]
tests/benchmarks/test_event_creation.py
CodSpeed Performance Gauge
0%
29.5 µs29.5 µs
test_from_event_type[lambda_event]
tests/benchmarks/test_event_creation.py
CodSpeed Performance Gauge
0%
29.1 µs29.2 µs
test_from_event_type[event_spec]
tests/benchmarks/test_event_creation.py
CodSpeed Performance Gauge
0%
52.6 µs52.8 µs
test_console_log
tests/benchmarks/test_event_creation.py
CodSpeed Performance Gauge
0%
423.2 µs425.2 µs
test_get_all_imports[_complicated_page]
tests/benchmarks/test_compilation.py
CodSpeed Performance Gauge
0%
2.8 ms2.8 ms
test_compile_page_full_context[_stateful_page]
tests/benchmarks/test_compilation.py
CodSpeed Performance Gauge
-1%
35.4 ms35.7 ms
test_compile_page_single_pass[_complicated_page]
tests/benchmarks/test_compilation.py
CodSpeed Performance Gauge
-2%
131.6 ms133.8 ms
test_compile_page_single_pass[_stateful_page]
tests/benchmarks/test_compilation.py
CodSpeed Performance Gauge
-2%
32.7 ms33.3 ms
test_compile_single_pass_all_artifacts[_stateful_page]
tests/benchmarks/test_compilation.py
CodSpeed Performance Gauge
-2%
29.2 ms29.7 ms
test_compile_single_pass_all_artifacts[_complicated_page]
tests/benchmarks/test_compilation.py
CodSpeed Performance Gauge
-2%
81.8 ms83.5 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
2df5344
-28.78%
Merge remote-tracking branch 'upstream/main' into immutability
41e141c
20 hours ago
by FarhanAliRaza
+32.59%
perf: speed up Component construction hot path
d1d22c5
18 hours ago
by FarhanAliRaza
-0.13%
fix: preserve empty event_triggers dict and rename shadowed field var
78f1602
18 hours ago
by FarhanAliRaza
© 2026 CodSpeed Technology
Home Terms Privacy Docs