GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||
GeezerVison is showing github.com — fs: improve globSync performance by Trott · Pull Request #57725 · nodejs/node Conversation
Member
Benchmark results:
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
cjihrig
approved these changes
|
There was an error while loading. Please reload this page.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@ ## main #57725 +/- ## ========================================== - Coverage 90.22% 90.22% -0.01% ========================================== Files 630 630 Lines 185073 185070 -3 Branches 36222 36223 +1 ========================================== - Hits 166990 166982 -8 + Misses 11044 11041 -3 - Partials 7039 7047 +8
🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| // if it matches be more performant in the typical use case? #isExcluded() | ||
| // is often ()=>false which is about as optimizable as a function gets. | ||
| if (this.#cache.statSync(fullpath).isDirectory() && this.#isExcluded(`${fullpath}/`)) { | ||
| if (this.#isExcluded(`${fullpath}/`) && this.#cache.statSync(fullpath).isDirectory()) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think the fastest way to would be to use this function: https://github.com/nodejs/node/blob/main/src/node_file.cc#L1053
Particularly: internalBinding('fs').internalModuleStat(path) which avoids creating unnecessary Dir/Dirent objects.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Landed in b2ab1a2 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'll take a look at @anonrig's suggestion for a subsequent PR (unless someone beats me to it!). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
PR-URL: #57725 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
PR-URL: #57725 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
PR-URL: #57725 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
PR-URL: #57725 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
PR-URL: #57725 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
PR-URL: #57725 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
PR-URL: #57725 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.