fix: walk and copy directories without a stat per file - #3
Open
anurag6569201 wants to merge 1 commit into
Open
anurag6569201 wants to merge 1 commit into
anurag6569201 wants to merge 1 commit into
Conversation
Source PR: sveltejs#16995 Source head: 7b73f95
⛔ Shipwright · BlockedRecommendation: do not merge PR #3 · Tier
Findings (3)
Fireworks usage: 7,016 input · 619 output · 7,635 total tokens · $0.0011 · 133s · 0 fix iteration(s) Open the Shipwright check for full evidence and the audit bundle. Use |
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.
walkandcopyinpackages/kit/src/utils/filesystem.jsstat every entry to find out whether it is a directory, andcopyalso callsmkdirSyncfor every file and rebuilds each returned path from the absolute target.readdirSyncalready knows the entry type, so both now read it from there, andcopycreates each directory once and carries the relative path down the recursion.5000 files in 200 directories:
walk24 ms to 4 ms,copy114 ms to 86 ms.Summary by CodeRabbit
Source merge-base:
03f1687fe612ce3d2d9131139b5b188d9cf90c64Source head:
7b73f95c60c191209839826d6f6d6556738a21d5