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

Improvements for CLI load time #5070

Closed
chrisjsewell opened this issue Aug 12, 2021 · 0 comments · Fixed by #5080
Closed

Improvements for CLI load time #5070

chrisjsewell opened this issue Aug 12, 2021 · 0 comments · Fixed by #5080
Assignees
Projects

Comments

@chrisjsewell
Copy link
Member

Thanks for the clarification, it was just since you asked for feedback and I didn't understand that the time difference has disappeared. If the time difference is negligible I'm ok with the merge.
Just to report, I also run on my computer and I get:

This branch:

Benchmark #1: verdi
  Time (mean ± σ):     387.7 ms ±  18.9 ms    [User: 315.7 ms, System: 65.9 ms]
  Range (min … max):   371.0 ms … 428.8 ms    10 runs

develop:

Benchmark #1: verdi
  Time (mean ± σ):     338.6 ms ±   5.1 ms    [User: 275.4 ms, System: 57.6 ms]
  Range (min … max):   331.4 ms … 346.4 ms    10 runs

So I'm OK to merge.

However, while looking into it with cProfile+snakeviz, I realised that a call to cmd_computer was taking a lot of time (~80ms) even when the command was not involved (e.g. when expanding "verdi data bands sho").

In this branch, if you comment out the whole content of the cmd_computer.py file, indeed the time goes down significantly from ~370ms to ~305ms.
If you just uncomment this single line:

from aiida.transports import cli as transport_cli

Then the time goes up again.

If you want to give a look into this already now, great, otherwise I'm ok with merging this as is since this would be a further improvement, but in this case could you please open an issue mentioning this? (I also have the feeling that there might be at least one or two similar things one could improve, e.g. also cmd_archive seems to be taking some time, but the cProfile+snakeviz is quite complex to "parse" and I still don't know if it's in addition to the time of cmd_computer or not).

Originally posted by @giovannipizzi in #5058 (comment)

@chrisjsewell chrisjsewell self-assigned this Aug 12, 2021
@chrisjsewell chrisjsewell added this to To do in v2.0 via automation Aug 12, 2021
v2.0 automation moved this from To do to Done Aug 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
v2.0
Done
Development

Successfully merging a pull request may close this issue.

1 participant