Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Autocomplete taking a long time to start terminal #1066

Open
gontijolucas opened this issue Jun 15, 2022 · 0 comments
Open

Autocomplete taking a long time to start terminal #1066

gontijolucas opened this issue Jun 15, 2022 · 0 comments

Comments

@gontijolucas
Copy link

What happened: when ritchie autocomplete is present on my .zshrc file, my 'bash' session takes around 30 seconds to be ready to use.

What you expected to happen: That there is no delay as big as this at the beginning of my Bash session.

How to reproduce it (as minimally and precisely as possible): ritchie autocomplete needs to be in start script. ~/.zshrc

[[ -r /usr/local/bin/rit ]] && rit completion zsh > ~/.rit_completion
source ~/.rit_completion

Anything else we need to know?:

I have benchmarked my bash to find the source of problem, and It seems that the problem occurred in the rit conclusion zsh.

With ritchie autocomplete, start in almost 30 seconds.

~ hyperfine --shell zsh 'source ~/.zshrc'
Benchmark 1: source ~/.zshrc
  Time (mean ± σ):     24.987 s ± 11.152 s    [User: 0.200 s, System: 0.039 s]
  Range (min … max):    0.454 s … 30.219 s    10 runs

Testing ritchie autocomplete command in my .zshrc

~ hyperfine 'rit completion zsh > ~/.rit_completion'
Benchmark 1: rit completion zsh > ~/.rit_completion
  Time (mean ± σ):     24.987 s ± 11.152 s    [User: 0.200 s, System: 0.039 s]
  Range (min … max):    0.454 s … 30.219 s    10 runs

Without ritchie autocomplete, start in 205ms.

~ hyperfine --shell zsh 'source ~/.zshrc'
Benchmark 1: source ~/.zshrc
  Time (mean ± σ):     199.7 ms ±   2.0 ms    [User: 180.8 ms, System: 31.5 ms]
  Range (min … max):   197.6 ms … 205.4 ms    14 runs

Environment:

  • Ritchie version (use rit --version): 2.11.3
  • Operating System: Linux (Ubuntu 22.04 LTS)
  • Network plugin / Tool and version (if this is a network-related / tool bug):
  • Others:
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant