-
-
Notifications
You must be signed in to change notification settings - Fork 595
perf(napi/parser): lazy-load raw transfer and lazy deser code #11807
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
graphite-app
merged 1 commit into
main
from
06-19-perf_napi_parser_lazy-load_raw_transfer_and_lazy_deser_code
Jun 19, 2025
Merged
perf(napi/parser): lazy-load raw transfer and lazy deser code #11807
graphite-app
merged 1 commit into
main
from
06-19-perf_napi_parser_lazy-load_raw_transfer_and_lazy_deser_code
Jun 19, 2025
Conversation
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
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
dd2f95b
to
6ed3760
Compare
Contributor
Author
Merge activity
|
Raw transfer and raw lazy deserialization are experimental and not publicly advertised. Lazy-load all code for these features only when they're first used. Lazy deserialization in particular requires a non-trivial amount of code. `rawTransferSupported` still needs to be eagerly loaded, as user would call it before calling `parseSync` or `parseAsync`. So move it into a separate module.
6ed3760
to
3a0a673
Compare
graphite-app bot
pushed a commit
that referenced
this pull request
Jun 19, 2025
Pure refactor. Rename `raw-transfer/index.js` to `raw-transfer/common.js`. After #11807, it's no longer the entry point, so `index.js` is misleading.
graphite-app bot
pushed a commit
that referenced
this pull request
Jun 19, 2025
Tiny perf optimization to raw transfer. #11807 made this whole file lazy-loaded, so no need to lazily create the `TextEncoder` any more. If the file is imported, it's going to be used.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-performance
Category - Solution not expected to change functional behavior, only performance
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.
Raw transfer and raw lazy deserialization are experimental and not publicly advertised. Lazy-load all code for these features only when they're first used.
Lazy deserialization in particular requires a non-trivial amount of code.
rawTransferSupported
still needs to be eagerly loaded, as user would call it before callingparseSync
orparseAsync
. So move it into a separate module.