question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Optimize conan install --update

See original GitHub issue

Running conan install -u on my conanfile that links in 10 different packages takes almost 30 seconds when nothing gets updated. My guess is that it does something like:

for p in package:
  hash(p)
  check_local(p)
  check_remote(p)

I think this can probably be optimized so that if it’s the hashes that take time: do them in parallel, if it’s the calls to remote we probably should extend the API to do fewer calls to check more info.

Why is this needed?

For a release build I wipe my conan dir on the CI to make sure I have the latest and greatest even if the version number hasn’t changed. But for local developers I also want to make sure that it’s fast to check for updates on all binary packages so that they don’t sit and spend a lot of time debugging something already fixed.

Ideally our cmake run could execute conan install -u everytime - that requires the execution to go down from 30 seconds to around 1-2 seconds though.

Let me know if I can do some local profiling.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:17 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
memshardedcommented, Jun 28, 2022

Thanks very much @cubanpit for testing and following up. Indeed seems a case on the Gitlab side. You can link the issue here if you report, so we can track it too. I’d possibly recommend keeping your ArtifactoryCE around, at least locally, specially because Conan 2.0 works exclusively with API v2, and Gitlab hasn’t implemented it yet, so it will not be possible to test it (even in Conan 1.X with revisions enabled, to be ready for 2.0). And 2.0 is looking fantastic, it will be a great improvement.

I will leave this ticket open, because the original issue of potential optimization of --update is still valid.

0reactions
cubanpitcommented, Jun 29, 2022

Here are the traces in the two cases: conan_trace_artifactory.log conan_trace_gitlab.log

This seems to confirm a bug in the GitLab implementation unfortunately. Thank you a lot for your support on the way. I wonder if there is any way to work-around this behavior, in the meantime I will submit a bug report to GitLab.

EDIT: Link to GitLab issue: https://gitlab.com/gitlab-org/gitlab/-/issues/366425

Read more comments on GitHub >

github_iconTop Results From Across the Web

conan install — conan 1.46.2 documentation
Installs the requirements specified in a recipe (conanfile.py or conanfile.txt). It can also be used to install a concrete package specifying a reference....
Read more >
Installing Conan dependencies | Software Architecture with C++
By default, Conan wants to download all the dependencies as prebuilt binaries. If the server doesn't have them prebuilt, Conan will build them...
Read more >
Conan Exiles: Dramatically increase performance / FPS with ...
Conan / Conan Exiles FPS increase guide, New Improvements, HUGE 1.0 Update,✔️ better fps, boost fps Lets try for 2000+ Likes!
Read more >
Confusion about the architecture of Conan - Stack Overflow
Also, build options in conan install command will affect its behavior. ... but generate different binaries, including optimization level.
Read more >
Conan packages in the Package Registry - GitLab Docs
To run conan commands, you must add the Package Registry as a Conan remote for your project or instance. Then you can publish...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found