Skip to content

Track all rx.memo components#5172

Merged
adhami3310 merged 4 commits intomainfrom
masenf/track-all-rx-memo
Apr 24, 2025
Merged

Track all rx.memo components#5172
adhami3310 merged 4 commits intomainfrom
masenf/track-all-rx-memo

Conversation

@masenf
Copy link
Copy Markdown
Collaborator

@masenf masenf commented Apr 24, 2025

Automatically compile any @rx.memo decorated function

If a component is memoized anywhere in the app, include the component in the generated output.

Avoid extra component tree walk, since we can know immediately what all of the custom components are. Any perf optimization gained by not compiling unused memo functions is handily saved by avoiding the tree walk.

dynamic: bundle local $/utils/components (rx.memo) module]

allow @rx.memo decorated functions to be referenced by dynamic components (which allows working around most limitations with dynamic components).

move special cases for $/ prefix modules to _normalize_library_path and include them in bundled_libraries so they can be checked at runtime.

masenf added 3 commits April 23, 2025 23:06
If a component is memoized anywhere in the app, include the component in the
generated output.

Avoid extra component tree walk, since we can know immediately what all of the
custom components are. Any perf optimization gained by not compiling unused
memo functions is handily saved by avoiding the tree walk.
allow `@rx.memo` decorated functions to be referenced by dynamic components
(which allows working around most limitations with dynamic components).

move special cases for $/ prefix modules to `_normalize_library_path` and
include them in `bundled_libraries` so they can be checked at runtime.
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 24, 2025

CodSpeed Performance Report

Merging #5172 will not alter performance

Comparing masenf/track-all-rx-memo (7ff87ea) with main (a420b17)

Summary

✅ 12 untouched benchmarks

@masenf masenf marked this pull request as ready for review April 24, 2025 18:14
@adhami3310 adhami3310 merged commit f3df526 into main Apr 24, 2025
42 checks passed
@adhami3310 adhami3310 deleted the masenf/track-all-rx-memo branch April 24, 2025 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants