omerxx / tmux-sessionx

A Tmux session manager, with preview, fuzzy finding, and MORE
GNU General Public License v3.0
712 stars 63 forks source link

The popup feels slow #123

Open praveshishere opened 3 months ago

praveshishere commented 3 months ago

I am not sure if this is an issue, or is expected

but there is a delay, before the popup opens and, there is a delay when I navigate between sessions, I disabled the preview still the same.

alexanderfast commented 3 months ago

Joining this issue since I experience the same thing. The one second delay before i can start typing is rather jarring compared to other plugins that do the same thing (dump session list to fzf).

It feels like something traversing a directory tree when it shouldnt, so I disabled the custom paths setting, in addition to the preview. Though I'm not entirely sure how I would go about profiling the bash scripts when run inside tmux.

set -g @sessionx-preview-enabled 'false'
set -g @sessionx-custom-paths-subdirectories 'false'
praveshishere commented 2 months ago

Joining this issue since I experience the same thing. The one second delay before i can start typing is rather jarring compared to other plugins that do the same thing (dump session list to fzf).

It feels like something traversing a directory tree when it shouldnt, so I disabled the custom paths setting, in addition to the preview. Though I'm not entirely sure how I would go about profiling the bash scripts when run inside tmux.

set -g @sessionx-preview-enabled 'false'
set -g @sessionx-custom-paths-subdirectories 'false'

I don't exactly understand the traversing part, but the config does not help make it any faster

omerxx commented 1 week ago

Hi folks, is there any update on this? Are you still feeling slowness? Stating the obvious but - can you try with latest Tmux + FZF + vanilla sessoinx config and see whether it persists?

LoricAndre commented 1 week ago

I'm seeing it too, modifying the tmux_option_or_fallback calls to use the defaults earned me around 0.2 seconds. Would it be possible to expand those variables in the .tmux file and pass them to the script invocation in the keybind directly ? This would only run those calls once, instead of at every keybind.

LoricAndre commented 6 days ago

I tried my hand at a refactor to implement this in #152

raymccarthy commented 10 hours ago

I have discovered three things, but I am not sure of the significance.

  1. The plugin is lighting fast on my ubuntu dev macine
  2. It takes nearly 3 seconds to open on my ARM MacBook running Macos Sequoia
  3. It opens in less than half a second when I run the script directly on the command line of the Mac, without using the tmux key binding

So my conclusion is that the issue is in the tmux keybinding logic.