Closed 43081j closed 3 months ago
@mjeanroy any chance you can take a look at this?
it'll reduce install size upstream in a fair few packages (which ill contribute the version bump to once/if this lands)
Hi @43081j,
Thanks for the PR! Could you elaborate a bit more on what benefits it would bring?
I'm not against changing one dependency to another, but I'd like to understand pros & cons before, if you can give a bit more details that would be great.
sure 👍
this is partly related to the ecosystem cleanup im leading
in this particular case, we're only using glob for case-insensitive file matching and wildcard extensions. so we don't actually need a glob implementation to do what we want to do
glob libraries come at a cost (mostly package size and general cpu performance). by switching to something like fdir, we will see some perf gains and reduce the install footprint a fair chunk
for example, if you look at the tree, fdir has 0 dependencies while glob pulls in 15+ packages. this adds up in the wider picture
every little helps. this will improve some dependents which will gain from other cleanups i've been doing around other packages too
Thanks for all the details! I think it's worth replacing it, thanks for that!
Sorry for the delay, I have a lot of work these days :)
Removes
glob
and uses fdir instead with a basic directory traversal (no globs).Reduces the complexity of the file reading logic and the install size (~3MB glob vs 56KB fdir).