thecodrr / fdir

⚡ The fastest directory crawler & globbing library for NodeJS. Crawls 1m files in < 1s
https://thecodrr.github.io/fdir/
MIT License
1.51k stars 58 forks source link

A big THANK YOU is in order #57

Closed peterbe closed 3 years ago

peterbe commented 3 years ago

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 use glob.sync() and a whole mixed bag of other path.join() and tricky stuff. Today I was able to replace all of it with fdir 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.

thecodrr commented 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: