-
Notifications
You must be signed in to change notification settings - Fork 2
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
Improve Tutor's shell autocompletion response time #26
Comments
Interesting. I agree that auto-completion is a tad slow. I'm curious to see what we will discover when we profile Tutor. (profiling is always fun!) |
Hey @ARMBouhali , do you have any interest in working on this? |
I decided to give another stab at this issue. I'll write down my notes here. First of all, it's quite easy to run tutor in "completion mode". For instance, to simulate the completion of
(I found this by running bash with the From that point it's relatively easy to profile shell completion. Create a
Then run this script:
Here are the first items > 0.1s cumulative time. I highlighted a couple of suspicious items:
We should definitely investigate why |
Background
I've been using tutor for my deployments since Open edX's maple release, and over 6 months as a development environment.
One of the yet-to-be-solved DevExp issues I've faced is the slowness of the shell autocomplete feature.
Here is my experience with testing a basic
tutor [tab][tab]
in bash.late (:cry:) not-so-strongubuntu machine [4G CPU / 16GB DDR3L / SSD]: response time was over 3s before the available commands are completed.[tab]
have around 0.4s response time (which is quite acceptable but not applicable to less powerful machines).Tasks
A suggested roadmap:
pip install tutor
) vs tutor installed in editable mode (pip install -e git+<tutor-gh-repo>
)Notes
claims that larger python module imports is one potential bottleneck, and suggests to either move imports inside the command logic, or better to completely separate execution logic from CLI logic.
FYI @regisb
The text was updated successfully, but these errors were encountered: