Skip to content
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

lib: remove unnecessary lazy loading in internal/encoding #45810

Merged
merged 1 commit into from Dec 12, 2022

Conversation

aduh95
Copy link
Contributor

@aduh95 aduh95 commented Dec 10, 2022

node:buffer is snapshotted, so there's no benefit in lazy loading it.

@nodejs-github-bot nodejs-github-bot added encoding Issues and PRs related to the TextEncoder and TextDecoder APIs. needs-ci PRs that need a full CI run. labels Dec 10, 2022
@daeyeon
Copy link
Member

daeyeon commented Dec 10, 2022

Is the lazy loading valid in --without-node-snapshot builds?

@aduh95
Copy link
Contributor Author

aduh95 commented Dec 10, 2022

Is the lazy loading valid in --without-node-snapshot builds?

Folks using a build of Node.js without the snapshot are choosing a slower bootstrap to get a better smaller binary, and since this change doesn't impact the binary size, I expect they don't really care about it.

Copy link
Member

@daeyeon daeyeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without such a function, I guess that a module now snapshotted would be hard to detect when it won't need to be snapshotted in the future. However, I agree with this change since it seems hard to make buffer not snapshotted even in the future.

@daeyeon daeyeon added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Dec 10, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 10, 2022
@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 11, 2022
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 12, 2022
@nodejs-github-bot nodejs-github-bot merged commit aa2ca81 into nodejs:main Dec 12, 2022
@nodejs-github-bot
Copy link
Collaborator

Landed in aa2ca81

@aduh95 aduh95 deleted the encoding-no-lazy-loading branch December 12, 2022 15:28
targos pushed a commit that referenced this pull request Dec 12, 2022
PR-URL: #45810
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
targos pushed a commit that referenced this pull request Dec 13, 2022
PR-URL: #45810
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
danielleadams pushed a commit that referenced this pull request Dec 30, 2022
PR-URL: #45810
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
danielleadams pushed a commit that referenced this pull request Dec 30, 2022
PR-URL: #45810
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
danielleadams pushed a commit that referenced this pull request Jan 3, 2023
PR-URL: #45810
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
danielleadams pushed a commit that referenced this pull request Jan 4, 2023
PR-URL: #45810
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
@danielleadams
Copy link
Member

Requesting a backport to v18.x since it broke some tests in v18.x-staging.

@danielleadams danielleadams added the backport-requested-v18.x PRs awaiting manual backport to the v18.x-staging branch. label Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. backport-requested-v18.x PRs awaiting manual backport to the v18.x-staging branch. encoding Issues and PRs related to the TextEncoder and TextDecoder APIs. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants