-
Notifications
You must be signed in to change notification settings - Fork 61
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
tmux-copycat slow on my machine #129
Comments
Hi,
yea, the plugin can get be slower as you described. I don't think it's
anything related to your config.
…On 2018-08-04 11:06, Christopher Francisco wrote:
I just installed this plugin. I saw the [screencast](https://vimeo.com/101867689) and it looks very fast. However, on my machine it takes around `1 second` to find a match. Not sure what did I do wrong. Here's my tmux config:
```
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# don't rename windows automatically
set-option -g allow-rename off
# allow mouse to scroll
set -g mouse on
# scrolling 1 per line
set -g @scroll-speed-num-lines-per-scroll "1"
# themepack theme
set -g @ThemePack 'powerline/block/gray'
# We want tmux to support 256 colors and allow itallics
set -g default-terminal 'tmux-256color'
set -as terminal-overrides ',xterm*:Tc:sitm=E[3m'
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
set -g @plugin 'jimeh/tmux-themepack'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#129
|
Are you sure? in the screencast it looks blazing fast. Maybe there's something I can do to make it faster(?) |
Unbearably slow on my setup as well, hope to get around to profiling.... |
Looks to be disk bound performance issues (at least for me)... not sure if its just the amount of external sourcing of bash files or if its that I am an oddball on nixos package manager/wsl. I'll try again later on a less akward setup. The ~3 seconds for the command to take action kind of matches up with the disk activity in task manager. I'm running a 960 pro, so disk work should be pretty fast. |
on latest model 15" macbook pro and definitely seeing extreme slow down on that hardware too.. latest tmux + kitty (term) |
Are you guys running large tmux scrollback histories, the I use |
I've set |
I'm having trouble, too; using the I first began noticing this problem sometime last year; there definitely was a time when it seemed as snappy as in the screencast. I definitely don't mean to complain: the only reason this is a problem is because the plugin is incredibly useful. But I'd love it if anyone had any insight into what might be going on: this speed makes it a little hard to rely on the plugin the way I used to. |
I too would love to be able to use this plugin; however it's unbearably slow for me (it takes multiple seconds after pressing my keybinding for anything to happen) and I believe the culprit is I/O. I work on NFS mounts almost exclusively and the temporary files that copycat is writing are being made in the $CWD. If the temporary directory were made configurable, I could point it to /tmp or /dev/shm (memory) which would make this usable. Please consider making it configurable or make it respect the standard TMP, TMPDIR or TEMP environment variables. update: My bad, I see that _get_tmp_dir() does use TMPDIR. Guess I'm going to have to find a better way to profile this... |
What's the reason for dumping the buffer to a text file before searching it? I'd be happy to help make this faster. The plugin is a great idea but right now unfortunately pretty annoying to use. |
Do you have time/capacity to action this? A lot of people would be very thankful! |
I did some digging and it looks like the slowness is not caused by dumping the buffer first. By default, copycat dumps up to 9,000,000 scrollback lines, but changing this to even 100 does not make a noticeable difference. Instead, the bulk of the "lag" comes in the copycat_cancel_bindings function. Whenever copycat mode is started, copycat extends the keybindings it needs for both searching and cancelling. To do this, it parses the output of For I am not yet sure what the solution is, but at least now we know where the problem is. |
I was able to get a little bit of improvement in my fork here. There is still a delay, although in my (limited) testing it does seem to be significantly less than it is now. I think the remaining delay comes from the actual calls to |
Would it be possible to bind the keys (maybe different ones to avoid conflicts) once during startup rather than every time copy mode is entered? |
I think this is possible -- I'm not sure if maybe @bruno- or someone
else had a reason for not doing this, but since the copycat scripts that
we bind those keys to check if we are in "copycat mode" and simply do
nothing if we're not, I think it's safe to simply leave those keys bound
at all times.
I've updated my fork [1] with that change, so feel free to test it out. It's still not as snappy as I think I would like it to be but it is still noticably quicker.
[1]: https://github.com/gpanders/tmux-copycat/tree/improve-search-speed
…On Sun, 03 Nov 2019 at 03:33 PM, Danijar Hafner wrote:
Would it be possible to bind the keys (maybe different ones to avoid conflicts) once during startup rather than every time copy mode is entered?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#129 (comment)
|
Thanks @gpanders, the changes on your branch make a big difference on my machine... as in this plugin is usable again for me 🙌 |
@gpanders's changes make this indeed faster and like they said it still isn't as fast as one would like it's already a huge improvement as this plugin is once again usable, kudos! It also got merged to master over a month ago so no need to do like I did and replace the official release with his branch :) Don't know if this can be regarded as solved though. I'd guess yes and any future performance issues should go to a new ticket since this has gotten stale and there already are some performance improvements implemented after filing the ticket. |
@okuuva Due to the email I received when you commented, I reinstalled my tmux packages and am happy beyond my ability to describe to find that copycat is much faster than it was. Maybe it could be faster still, but—for me—it's definitely back into the very usable category. Thanks to everyone who helped improve the situation. |
Also chiming in to confirm this is fast enough to be useful again! 🙌 |
Damn! it's blazing fast!! I love it! Can we get a link to the commit/PR, in case anybody wants to work on an improvement? It's amazing now. I agree that it could be better, however it is good enough to be usable in a workflow. Love you guys!! |
Hey @gpanders! I saw your fork and I wanted to try it out. I didn't notice changes in speed so I wanted to confirm the way I am installing it. I did a manual installation and cloned the library and called I observed similar speeds but a lot of folks were saying that speeds heavily improved for them so I wanted to confirm my way of installing your fork. |
Hi @hqkhan, my changes were merged into this repo back in January, so you won't see any difference between my fork and this repo right now. |
Btw this issue should be resolved by #148 |
Gotcha. That's odd because I tried the repo first and it was really slow for me. I am on WSL-1 and |
I just installed this plugin. I saw the screencast and it looks very fast. However, on my machine it takes around
1 second
to find a match. Not sure what did I do wrong. Here's my tmux config:The text was updated successfully, but these errors were encountered: