-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache the results #18
Comments
Hi, the response of Lines 8 to 16 in d49b8d3
The response of running the detect-libc/lib/detect-libc.js Lines 9 to 21 in d49b8d3
The benchmark timings for the underlying |
Oh nice, sorry for misreading the code, I will update my statement on the linked issue. About removing the usage, I see some JS libraries that use The problem with But I also find cases in other languages where ldd is used to check for musl. I think this could be released as a major version as we don't exactly know the potential issues, or am I being a lot safer? |
I tested this with a few flavours of Linux and versions of Node.js and can confirm the use of However the libc version number is not always available via the |
So, we can optimize familly, which will speed up If that's the case, I can open a PR to improve these methods. |
Most of the functions depend on functions that are expensive to call, I even opened an issue on NodeJS to talk more about it nodejs/node#48204.
So, if more than one library depends on this library and the results from it, they will call the expensive functions twice, do you see some issue with caching it?
Also, some libraries uses a faster way of checking if
musl
is supported, like https://github.com/swc-project/cli/blob/master/src/swcx/index.ts#L78, I don't know why they usegetReport
but did you see any issue with this method?The text was updated successfully, but these errors were encountered: