lib: make navigator properties lazy#53649
Merged
nodejs-github-bot merged 1 commit intonodejs:mainfrom Jul 4, 2024
Merged
Conversation
Collaborator
|
Review requested:
|
5a3b5a3 to
3d2e10f
Compare
MoLow
approved these changes
Jun 30, 2024
panva
approved these changes
Jun 30, 2024
Noticed in some benchmarking/profiling that the Navigator object constructor was rather expensive and slow due to initialization of properties during construction. It makes more sense for these to be lazily initialized on first access.
3d2e10f to
875952b
Compare
jasnell
commented
Jun 30, 2024
tniessen
approved these changes
Jun 30, 2024
anonrig
approved these changes
Jun 30, 2024
benjamingr
approved these changes
Jun 30, 2024
This comment was marked as outdated.
This comment was marked as outdated.
Collaborator
Collaborator
|
Landed in 8040994 |
ljharb
added a commit
to ljharb/node
that referenced
this pull request
Jul 8, 2024
…form Preserves most of nodejs#53649, except for `#language` due to the lack of Intl primordials.
ljharb
added a commit
to ljharb/node
that referenced
this pull request
Jul 8, 2024
Preserves most of nodejs#53649, except for `#language` due to the lack of Intl primordials.
ljharb
added a commit
to ljharb/node
that referenced
this pull request
Jul 8, 2024
Preserves most of nodejs#53649, except for `#language` due to the lack of Intl primordials.
ljharb
added a commit
to ljharb/node
that referenced
this pull request
Jul 8, 2024
Preserves most of nodejs#53649, except for `#language` due to the lack of Intl primordials.
ljharb
added a commit
to ljharb/node
that referenced
this pull request
Jul 8, 2024
Preserves most of nodejs#53649, except for `#language` due to the lack of Intl primordials.
ljharb
added a commit
to ljharb/node
that referenced
this pull request
Jul 8, 2024
Preserves most of nodejs#53649, except for `#language` due to the lack of Intl primordials.
ljharb
added a commit
to ljharb/node
that referenced
this pull request
Jul 8, 2024
Preserves most of nodejs#53649, except for `#language` due to the lack of Intl primordials.
ljharb
added a commit
to ljharb/node
that referenced
this pull request
Jul 8, 2024
Preserves most of nodejs#53649, except for `#language` due to the lack of Intl primordials.
ljharb
added a commit
to ljharb/node
that referenced
this pull request
Jul 8, 2024
Preserves most of nodejs#53649, except for `#language` due to the lack of Intl primordials.
ljharb
added a commit
to ljharb/node
that referenced
this pull request
Jul 8, 2024
Preserves most of nodejs#53649, except for `#language` due to the lack of Intl primordials.
ljharb
added a commit
to ljharb/node
that referenced
this pull request
Jul 8, 2024
Preserves most of nodejs#53649, except for `#language` due to the lack of Intl primordials.
ljharb
added a commit
to ljharb/node
that referenced
this pull request
Jul 9, 2024
ljharb
added a commit
to ljharb/node
that referenced
this pull request
Jul 9, 2024
ljharb
added a commit
to ljharb/node
that referenced
this pull request
Jul 9, 2024
ljharb
added a commit
to ljharb/node
that referenced
this pull request
Jul 11, 2024
ljharb
added a commit
to ljharb/node
that referenced
this pull request
Jul 11, 2024
ljharb
added a commit
to ljharb/node
that referenced
this pull request
Jul 11, 2024
aduh95
pushed a commit
that referenced
this pull request
Jul 12, 2024
Noticed in some benchmarking/profiling that the Navigator object constructor was rather expensive and slow due to initialization of properties during construction. It makes more sense for these to be lazily initialized on first access. PR-URL: #53649 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Merged
ljharb
added a commit
to ljharb/node
that referenced
this pull request
Jul 15, 2024
ljharb
added a commit
to ljharb/node
that referenced
this pull request
Jul 15, 2024
ljharb
added a commit
to ljharb/node
that referenced
this pull request
Jul 15, 2024
nodejs-github-bot
pushed a commit
that referenced
this pull request
Jul 15, 2024
Preserves #53649. PR-URL: #53765 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
aduh95
pushed a commit
that referenced
this pull request
Jul 16, 2024
Noticed in some benchmarking/profiling that the Navigator object constructor was rather expensive and slow due to initialization of properties during construction. It makes more sense for these to be lazily initialized on first access. PR-URL: #53649 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
aduh95
pushed a commit
that referenced
this pull request
Jul 16, 2024
Preserves #53649. PR-URL: #53765 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
aduh95
pushed a commit
that referenced
this pull request
Jul 16, 2024
Preserves #53649. PR-URL: #53765 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
ehsankhfr
pushed a commit
to ehsankhfr/node
that referenced
this pull request
Jul 18, 2024
Preserves nodejs#53649. PR-URL: nodejs#53765 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Noticed in some benchmarking/profiling that the Navigator object constructor was rather expensive and slow due to initialization of properties during construction. It makes more sense for these to be lazily initialized on first access.
Flamegraphs... of `node -pe "navigator"
Before:

After:
