nvim-tmux-navigation icon indicating copy to clipboard operation
nvim-tmux-navigation copied to clipboard

optimization: Speed up pane switching by circumventing shell and tmux CLI when possible

Open srithon opened this issue 5 months ago • 0 comments

  1. Motivation for circumventing Shell: Shell startup time is significant. For some reason, as @isaksamsten mentioned on #16, switching is significantly slower in Fish shell than in other shells. I did some experimentation and found that vim.fn.system(<string>) is slow when the shell option is set to Fish. This change removes dependence on the shell entirely when switching tmux panes, since system doesn't use a shell when a table is provided in place of a string.
  2. Motivation for short circuiting zoom check: This lets us cut out the latency from invoking tmux at all, when a faster boolean check would rule out the conditional

srithon avatar Sep 01 '24 20:09 srithon