nvim-orgmode / nvim-orgmode/orgmode

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

Open
#1,118 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Lua
Stars
3.9k
Forks
190
Avg merge
2d 13h
Merged PRs (30d)
7

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the freeze using the provided minimal init.lua with 30+ large org files and notifications enabled, then profile notification fetching to identify the blocking work. Done means the same workload no longer periodically freezes the Neovim UI.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.