Closed IdoKendo closed 1 month ago
Hey @IdoKendo, thanks for opening this issue.
Explaining this code:
basename
.$sessions
) using grep
.This is a possible slowdown when there are many paths.
Alternatives that I would consider:
tr
Hey @ProgmRuanSilva 👋
I was playing around a bit with it and I think that in order to keep the same logic, it's possible to use xargs to run this loop in parallel using --max-procs
flag, I can open a PR if this solution makes sense. WDYT?
Hey @ProgmRuanSilva 👋
I was playing around a bit with it and I think that in order to keep the same logic, it's possible to use xargs to run this loop in parallel using
--max-procs
flag, I can open a PR if this solution makes sense. WDYT?
We can make it in two ways:
&>/dev/null
Important: The fzf is not asynchronous by default we need specify it using --sync like in this issue
If you can open the PR with these changes, I would appreciate it.
Hey @ProgmRuanSilva I opened a PR. Would appreciate if you could review 🙏
Hey @ProgmRuanSilva I opened a PR. Would appreciate if you could review 🙏
I will see tomorrow
Hey 👋 I've noticed that in cases when there are many custom_paths, this piece of code seems to be a bottleneck in startup time:
In comparison, if I just use
echo $paths | tr ' ' '\n'
it runs in the blink of an eye. The downside is that it will show existing sessions' paths still, e.g. if I have a custom path~/projects/tmux-sessionx
and an existing sessiontmux-sessionx
they will both appear.Not sure what is the best solution here, maybe there's another option to improve the performance of the above loop that I'm not thinking of.