-
Notifications
You must be signed in to change notification settings - Fork 27
Incremental reporting of Conda envs #28
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
Conversation
@@ -39,5 +40,5 @@ pub trait Locator: Send + Sync { | |||
/** | |||
* Finds all environments specific to this locator. | |||
*/ | |||
fn find(&self) -> Option<LocatorResult>; | |||
fn find(&self, reporter: &dyn Reporter); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously we'd report as soon as each locator finds environments.
Thats very fast.
However I can see conda getting slower and slower.
E.g. everything completes in < 50ms for me, except for conda.
Now that I have installed 30 conda envs, and 8 conda installs, it takes 100-200ms
So, first conda gets reported only after all conda envs have been disccovered.
The change is to now report immediately as they are discovered.
Perf is still the same, perhaps slightly faster,
let env = env.to_python_environment(None, None); | ||
let mut environments = self.environments.lock().unwrap(); | ||
environments.insert(prefix, env.clone()); | ||
reporter.report_environment(&env); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as soon as we discover anything we report it.
Previously we-d collect and return to calling code.
No description provided.