-
Notifications
You must be signed in to change notification settings - Fork 990
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
[bug] Slow package resolution from local cache when remotes are defined #6483
Comments
Hi, @fourbft, just a question: is something you have started to experience with Something to look into, for sure. |
We only began noticing this when our remotes slowed down and the issue jumped in our eye. |
Ok, thanks! So it should be Conan iterating and calling the remotes for nothing... maybe activating the trace_file is an easy way to know if we are doing any HTTP call. |
Here's what I've found so far:
The question now is if it is really necessary to query the binary data when no local data is available. The code within |
I've created a PR with the necessary changes. As the code I changed is used in a lot of other parts of Conan I have no idea if there's something breaking. |
To copy what's been discussed in the PR: The "easy fix" is not solving the issue. It works for The question is if conan info really needs to gather info about remote binaries or not.
|
This is also relevant to our use-case. We'd like to be able to query the state of packages in the local cache and ignore remotes. So ideally, there would be some kind of special remote that is the local cache:
Or a flag that tells Conan to skip remotes for this command. |
Hi @cassava You can use In any case please note:
So there must be something else that you are seeing, but this command should be very fast if the packages are already in the cache. |
Context:
Recently we're having issues with our network infrastructure and our internal Conan remotes. In general it takes up to 5 seconds for a small package to get downloaded. We have a CI job which installs a Conan package and then does a number of
conan info
andconan inspect
on it.Issue:
Because of this we found the issue that even though packages are available in the local Conan cache it takes a long time to access them when remotes are defined.
Expected:
conan install A/1.0.0@user/channel
takes 5sec because of the slow remotesA/1.0.0@user/channel
are very fast because the package is already available in the local Conan CacheActual experience:
conan install A/1.0.0@user/channel
takes 5sec because of the slow remotesSome strange side effects:
Environment Details (include every applicable attribute)
Steps to reproduce (Include if Applicable)
Repeat
time conan info <ref>
a few times. Note the execution times.
Then do a
conan remote clean
Repeat
time conan info <ref>
a few times. Note the execution times, which are now faster than with remotes defined.
Redefine the remote(s)
and do the
time conan info <ref>
again. Times are now slower again.
Times are still slow, when all remotes are disabled via
'conan remote disable '
The text was updated successfully, but these errors were encountered: