Skip to content

fix(autocmd): skip non-normal buftype for performance - #450

Merged
sudo-tee merged 1 commit into
sudo-tee:mainfrom
phanen:fix/autoocmd
Jul 7, 2026
Merged

fix(autocmd): skip non-normal buftype for performance#450
sudo-tee merged 1 commit into
sudo-tee:mainfrom
phanen:fix/autoocmd

Conversation

@phanen

@phanen phanen commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

I notice :terminal becuase obviously slow after eebda20

Not sure why M.invalidate_reference_targets_for_file_change() is slow, but I think no problem to skip special buffer here.

image before/after `:terminal`

@sudo-tee

sudo-tee commented Jul 7, 2026

Copy link
Copy Markdown
Owner

@phanen thanks for the fix.

How did you get that nice flamechart from your nvim config ?

@phanen

phanen commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author
M.profile = function(out)
  out = out or '/tmp/tmp/profile.log'
  fn.mkdir(fs.dirname(out), 'p')
  if not _G.jit_profile then
    -- G option for https://github.com/jonhoo/inferno
    require('jit.p').start('10,i1,s,m0,G', out)
    print('profile started')
  else
    require('jit.p').stop()
    fn.system(('inferno-flamegraph %s > %s'):format(out, fs.joinpath(fs.dirname(out), 'profile.svg')))
    vim.system({ vim.env.BROWSER, '/tmp/tmp/profile.svg' })
    print('profile stoped')
  end
  _G.jit_profile = not _G.jit_profile
end

@sudo-tee
sudo-tee merged commit de48743 into sudo-tee:main Jul 7, 2026
5 checks passed
@phanen
phanen deleted the fix/autoocmd branch July 7, 2026 11:25
disrupted pushed a commit to disrupted/opencode-native.nvim that referenced this pull request Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants