You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf: resolution throws+catches an ENOENT per missing path (tryStatSync in bundled import-meta-resolve) #474
jiti's bundled copy of import-meta-resolve (via mlly) has tryStatSync() that calls statSync(path) in try/catch, so every probed non-existent path allocates an ENOENT error with a stack trace. Measured on jiti 2.7.0 loading 10 TS extensions: 530 thrown stats; with a 40-extension setup: 2304 thrown stats (~50 ms CPU per process start). Switching to statSync(path, {throwIfNoEntry:false}) removes all but 1/27. Fix proposed upstream in the source package: wooorm/import-meta-resolve#37 ; once released, mlly/jiti only need a dependency bump (jiti has no tryStatSync in src/). Local patch used meanwhile: same one-line change in dist/jiti.cjs.
Activity
pi0 commentedon Oct 8, 2026
we could likely migrate to https://github.com/unjs/exsolve instead. feel free to check if it solves issue