hydra.nvim icon indicating copy to clipboard operation
hydra.nvim copied to clipboard

Slowdown until freeze on tabpage navigation and creation

Open Fuglesteg opened this issue 2 years ago • 0 comments

Neovim version

NVIM v0.9.0-dev-1135+g419819b62
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3

Description of issue

I have a simple hydra for navigating and manipulating tabpages, and noticed slowdown when using the commands quickly. If i try to navigate quickly through a bunch of tabs neovim slows down and eventually stops, like exponential lag on each keypress. The same happens if I try to open a bunch of tabs. I have only experienced this when manipulating tabpages. I have disabled all plugins for troubleshooting without resolving the problem Here is the minimal hydra to reproduce the issue:

Configuration

local hydra = require("hydra")
local cmd = require("hydra.keymap-util").cmd
hydra({
    name = "Tabpage",
    mode = "n",
    body = "<leader>t",
    heads = {
        { "t", cmd "tabnext", { desc = "Next tabpage" } },
        { "T", cmd "tabprevious", { desc = "Previous tabpage" } },
        { "d", cmd "tabclose", { desc = "Close tabpage" } },
        { "c", cmd "tabnew", { desc = "New tabpage" } },
    },
    hint = [[Navigate]],
    config = {
        invoke_on_body = true,
        hint = {
            border = "double",
            position = "bottom",
            type = "window",
        },
    }
})

Steps to reproduce

  1. Spawn the hydra using <leader>t
  2. Create a bunch of tabs
  3. Navigate between them and see it slow down.

Expected: Seemless navigation between tabs Actual: Massive slowdown and eventual freezing of neovim

Example of creating tabs

In this clip I am spamming open new tabs to demonstrate slowdown, assume I am always spamming GIF Recording 2023-03-06 at 11 00 59 p m

Example of navigating tabs

The only negative to the issue as spamming to open new tabs is not really realistic, but navigating a few tabs is... As before assume I am always spamming the navigation buttons to move between them as fast as possible. GIF Recording 2023-03-06 at 11 03 49 p m

Fuglesteg avatar Mar 06 '23 22:03 Fuglesteg