Skip to content

Don't throw if entry doesn't exist#11

Merged
sindresorhus merged 3 commits intosindresorhus:mainfrom
abejfehr:patch-1
Feb 9, 2023
Merged

Don't throw if entry doesn't exist#11
sindresorhus merged 3 commits intosindresorhus:mainfrom
abejfehr:patch-1

Conversation

@abejfehr
Copy link
Copy Markdown
Contributor

@abejfehr abejfehr commented Feb 6, 2023

Inspired by this blog post, I set out to make metro faster.

image

Even getting the stack traces from the failures of fs.statSync alone is occupying a non-trivial amount of time, but just like in the blog post, we can pass in throwIfNoEntry: false to save some CPU time here

@sindresorhus sindresorhus merged commit dc42d90 into sindresorhus:main Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants