notification engine is slow and causes main UI thread to be blocked

Aperta
#1,118 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
lua
Ambito
performance

Direzione di ricerca

Riprodurre il blocco usando l’init.lua minimale fornito, con più di 30 file Org di grandi dimensioni e le notifiche abilitate, quindi profilare il recupero delle notifiche per identificare il lavoro bloccante. Il lavoro è completato quando lo stesso carico di lavoro non blocca più periodicamente l’interfaccia di Neovim.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
Describe the bug

notification engine is slow and causes main UI thread to be blocked.
I have many org files with 1000+ lines, and when notifications are enabled, the UI will periodically freeze when fetching notifications

checkhealth

==============================================================================
orgmode: ✅

Orgmode ~

  • ✅ OK Tree-sitter grammar is installed, but not by nvim-orgmode plugin. Any issues or version mismatch will need to be handled manually.
    If you want nvim-orgmode to manage the parser installation (recommended), remove the installed parser at "nil" and restart Neovim.
  • ✅ OK Setup called
  • ✅ OK org_agenda_files configured
  • ✅ OK org_default_notes_file configured
Steps to reproduce

Have 30+ org files with 1000+ lines of scheduled headers in each.

Expected behavior

UI does not freeze

Emacs functionality

No response

Minimal init.lua

local tmp_dir = vim.env.TMPDIR or vim.env.TMP or vim.env.TEMP or '/tmp'
local nvim_root = tmp_dir .. '/nvim_orgmode'
local lazy_root = nvim_root .. '/lazy'
local lazypath = lazy_root .. '/lazy.nvim'

for _, name in ipairs({ 'config', 'data', 'state', 'cache' }) do
  vim.env[('XDG_%s_HOME'):format(name:upper())] = nvim_root .. '/' .. name
end

-- Install lazy.nvim if not already installed
if not vim.uv.fs_stat(lazypath) then
  vim.fn.system({
    'git',
    'clone',
    '--filter=blob:none',
    'https://github.com/folke/lazy.nvim.git',
    '--branch=stable', -- latest stable release
    lazypath,
  })
end
vim.opt.rtp:prepend(lazypath)

require('lazy').setup({
  {
    'nvim-orgmode/orgmode',
    event = 'VeryLazy',
    ft = { 'org' },
    config = function()
      require('orgmode').setup(
        { 
          notifications = {
            enabled = true
          }
        }
      )
    end,
  },
}, {
  root = lazy_root,
  lockfile = nvim_root .. '/lazy.json',
  install = {
    missing = false,
  },
})

require('lazy').sync({
  wait = true,
  show = false,
})

Screenshots and recordings

No response

nvim-orgmode version

2fc30d36fd1c3e6086a7424858e19a52a29ae937

OS / Distro

NixOS

Neovim version/commit

0.11.6

Additional context

Here is my nixvim setup that I used to test functionality. https://github.com/dtvillafana/nixvim

Lingua principale
Lua
Stelle
3.9k
Fork
193
Merge medio
5g 7h
PR unite (30g)
6

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nvim-orgmode/orgmode

Tutte le issue di nvim-orgmode/orgmode

Issue simili

Altre issue su Lua

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.