Skip to content
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

mamba search --json slow? #835

Closed
ericpre opened this issue Apr 4, 2021 · 5 comments
Closed

mamba search --json slow? #835

ericpre opened this issue Apr 4, 2021 · 5 comments

Comments

@ericpre
Copy link

ericpre commented Apr 4, 2021

It seems that mamba search --json is significantly slower than mamba search: ~1 min 30s versus 3-4 s for mamba search. Is it expected?
The difference between the two seems to be the output format only.

See mamba-org/gator#132 for background: in short, this is slowing down retrieving packages in gator.

@wolfv
Copy link
Member

wolfv commented Apr 4, 2021

Mamba search is actually the exact same implementation as conda. Can you check if it's the same there? We have a

Mamba repoquery search function implemented in C++ that might be faster

@ericpre
Copy link
Author

ericpre commented Apr 5, 2021

It is possible to get the list of all packages as json using mamba repoquery search? It seems that it is necessary to specify a package. If I naively try mamba repoquery search, I get the following error:

mamba repoquery search: error: the following arguments are required: package_query

@wolfv
Copy link
Member

wolfv commented Apr 5, 2021

What do you mean, all packages? Why not use the repodata.json directly in that case?

You can use "*" maybe?

@ericpre
Copy link
Author

ericpre commented Apr 5, 2021

Yes, mamba repoquery search "*" --json seems to be providing a similar output as mamba search --json but much faster! I have tried * before but I was missing the quotation marks.
I don't know the details and I was surprised that getting the output as json would make it significantly slower but I agree that using repodata.json may be a more sensible/efficient approach.

@ericpre
Copy link
Author

ericpre commented Apr 6, 2021

Closing because mamba repoquery search "*" --json is a good alternative.

@ericpre ericpre closed this as completed Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants