-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Speed up memo-name hashing, move it into its own module, fix seven tag collisions #6947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
6b3d4cf
perf(compiler): speed up _update_deterministic_hash ~2.5x
claude 42c075e
docs: add changelog fragment for the component hash speedup
claude 91c4e26
refactor(compiler): move memo-name hashing into the memo module
claude 0d4be28
fix(compiler): release memo-naming caches once compilation is done
claude d753c6a
fix(compiler): close two more memo-name collisions, bound the hash bu…
claude 628ce4c
fix(compiler): release naming caches from the compile lifecycle
claude 6921d6d
chore: update pyi_hashes.json for the memo module change
claude b4a391d
Merge main into claude/optimize-deterministic-hash-u1dl2j
claude d222d24
perf(compiler): resolve hash encoders per type, fix a fifth memo coll…
claude c356e1a
Merge remote-tracking branch 'origin/main' into claude/pr-6947-incorp…
claude d8c2466
docs: tighten the changelog fragments
claude 210e002
Delete news/6947.performance.md
masenf a014143
refactor: move the deterministic hash into its own module
claude 70c75eb
docs: restore the reflex changelog fragment
claude 0150ec5
docs: note why the shared cached get_type_hints is not used here
claude 99dd019
perf(compiler): hash import library names, not the ImportVars under them
claude be7d2c2
fix(compiler): encode dataclass and enum identity; trim comments
claude d0415b3
test: cover values larger than the hash flush buffer
claude 66a360f
fix(compiler): hash ImportVars again; don't crash on an unhashable field
claude 0d12a44
test: isolate the annotation-mismatch test from the shared caches
claude File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Clear auto-memoization naming caches after compiling app. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| Auto-memoized components that render identically no longer share a generated memo name, which silently dropped one of the two compiled bodies. The name now accounts for: | ||
|
|
||
| - module-level code emitted by `add_custom_code` | ||
| - dynamic imports | ||
| - app-wrap components, including `rx.text` and the other `MarkdownComponentMap` components that all hashed alike | ||
| - the defining module, so same-named components from different modules stay apart | ||
| - the identity of dataclasses and enum members, which previously hashed by shape and by `str()` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Component content hashing, which auto-memoization runs for every memoized component during a compile, encodes roughly 1.2-1.3x faster on large pages. Generated memo module names change as a result; nothing outside the compiled output refers to them. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.