Closed peterbe closed 3 years ago
:exploding_head: I was not expecting this!
I am absolutely flabbergasted that yari
is now using fdir
. I checked the numbers and wow! I mean I have benchmarked myself but seeing independent numbers...is something else.
I am glad you found fdir
:laughing:
Cheekily, just wanted to abuse an issue for a good cause.
MDN Web Docs (now) uses
fdir
and it's looking extremely promising. We used to useglob.sync()
and a whole mixed bag of otherpath.join()
and tricky stuff. Today I was able to replace all of it withfdir
and I did it in such a way that I kept the old function so I could compare.All the numbers are in https://github.com/mdn/yari/pull/3537 and it might be a bit hard to read, but "So basically, the new function is 10x faster." is easy to understand :)
Awesome work!
Also, how I wish Node could get a low-level C++ native implementation, in the standard library, of
path.join()
and those guys to make this problem go away.