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

オープン
#1,118 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
lua
領域
performance

調査の方向性

提供された最小限の init.lua を使い、30 個を超える大きな Org ファイルと通知を有効にした状態でフリーズを再現し、その後、通知の取得をプロファイリングしてブロッキングの原因となっている処理を特定する。同じワークロードで Neovim の UI が定期的にフリーズしなくなれば完了とする。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Lua
スター
3.9k
フォーク
193
平均マージ
5日 7時間
マージ済み PR(30日)
6

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nvim-orgmode/orgmode のほかの issue

nvim-orgmode/orgmode の issue をすべて見る

似ている issue

Lua の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。