memfs icon indicating copy to clipboard operation
memfs copied to clipboard

chore: improve exist api performance

Open Kingwl opened this issue 2 weeks ago • 0 comments

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: image

After: image

Fixes #1217

Kingwl avatar Dec 11 '25 15:12 Kingwl