-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
perf: don't manipulate an empty value #25647
Merged
Merged
Changes from 30 commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
624ad48
perf(nuxt): don't iterate over an empty string
GalacticHypernova 4a6cee3
Update nuxt.ts
GalacticHypernova 45f034e
Update names.ts
GalacticHypernova 313379f
Update compatibility.ts
GalacticHypernova 19019cf
Update names.ts
GalacticHypernova 7b3714e
fix: reverse order of operation
GalacticHypernova ded3ff2
fix: use rawVersion
GalacticHypernova 3563b84
Merge branch 'main' into patch-9
GalacticHypernova 90fe0cc
Update warmup.ts
GalacticHypernova 94573d2
Update dev-only.ts
GalacticHypernova da99310
Update tree-shake.ts
GalacticHypernova d2bbad5
Update dev-only.ts
GalacticHypernova 6b534c7
Update warmup.ts
GalacticHypernova 28412d8
Update tree-shake.ts
GalacticHypernova 2315d99
Update warmup.ts
GalacticHypernova da88f27
Update tree-shake.ts
GalacticHypernova 40985b1
Update dev-only.ts
GalacticHypernova 6d6a526
Update module.ts
GalacticHypernova 78d31e8
Update ssr-styles.ts
GalacticHypernova bf6b815
Update nitro.ts
GalacticHypernova 22480ba
Update components.ts
GalacticHypernova 89df552
Update nuxt-error-page.vue
GalacticHypernova e3e3245
Update tree-shake.ts
GalacticHypernova 1b506d6
Update dev-only.ts
GalacticHypernova 5f00c81
Update names.ts
GalacticHypernova 345e7c5
Update warmup.ts
GalacticHypernova 2d40294
Update nitro.ts
GalacticHypernova fbcb8a2
Update module.ts
GalacticHypernova 3a4a98b
Update module.ts
GalacticHypernova 9958378
Update module.ts
GalacticHypernova e2115fa
Update packages/nuxt/src/core/plugins/dev-only.ts
GalacticHypernova 35e38a7
Merge branch 'main' into patch-9
GalacticHypernova 6dc63dd
perf: app.ts
GalacticHypernova 5481a6b
fix: proper null checks
GalacticHypernova 18435de
chore: reverse
GalacticHypernova 152a082
fix: proper null checks
GalacticHypernova a134c73
Update payload.ts
GalacticHypernova caefadf
Merge branch 'main' into patch-9
GalacticHypernova 0697051
chore: minor formatting and refactors
danielroe 7346e73
Merge remote-tracking branch 'origin/main' into patch-9
danielroe f083066
chore: space
danielroe a746111
refactor: rename variable
danielroe 0d70ae0
fix: add back missing return
danielroe 12a6d7b
fix: remove unneeded check
danielroe 5edd066
test: sort links
danielroe File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 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 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 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.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see an issue with the previous code here...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is kind of the same principle as everything else, if the array is empty the performance overhead to begin checking the iteration (even if exiting immediately) is much bigger than checking for a truthy length. I'll be able to append benchmark results when I get on PC but there was a notable increase in performance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update: here it is.