Skip to content

Big lag in big files #1026

@gerazov

Description

@gerazov

Describe the bug

I'm having lag issues when editing big org files in insert mode. The lag doesn't happen when navigating the file or folding/unfolding.

The problem is not decreased after turning off syntax highlighting by running lua vim.treesitter.stop()

It seems that complex file structure aggravates the issue. In my org files it is already really laggy at 2000 lines. To replicate with a test file I had to go up to 8000 lines. Here's the file with an md extension:

test1.md

The problem also appears when using the minimal_init.lua. The problem doesn't appear when editing the same file as md and not org via the minimal init.

checkhealth

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

Orgmode ~
- ✅ OK Treesitter grammar installed (version 2.0.0)
- ✅ OK Setup called
- ✅ OK `org_agenda_files` configured
- ✅ OK `org_default_notes_file` configured

Steps to reproduce

Rename provided file to test1.org and open with nvim -u minimal_init.lua
Go to end of file and start typing.

Expected behavior

No lag.

Emacs functionality

No response

Minimal init.lua

Use the one provided in the repo.

Screenshots and recordings

Image

nvim-orgmode version

commit b924cbb

OS / Distro

Manjaro

Neovim version/commit

NVIM v0.11.3

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions