memfs
memfs copied to clipboard
chore: improve exist api performance
The Error/Throw is very very slow (especially in a huge bundled javascript file)
This PR use a simple Result type to replace new control flow based on Error/Throw.
All tests has passed. Seems nothing broken.
This PR just replace the call tree of exists/existsSync . We can avoid more Error/Throw if everything looks good.
Before:
After:
Fixes #1217