immerrr / lua-mode

Emacs major mode for editing Lua
http://immerrr.github.io/lua-mode
GNU General Public License v3.0
316 stars 74 forks source link

Really bad performance while edit big lua table. #200

Open moyotar opened 2 years ago

moyotar commented 2 years ago

emacs version: GNU Emacs 29.0.50 (build 2, x86_64-pc-linux-gnu) of 2021-11-03

It's a almost 5000 lines lua table, for config.

local conf = {
        [100] = function()
                ...
        end,
        [101] = function()
                ...
        end,
        [102] = function()
                ...
        end,
        ...
}

image

moyotar commented 2 years ago

Inserting a newline cost 10+ seconds.

immerrr commented 2 years ago

@moyotar could you perhaps upload a gist of the table for easier repro?

moyotar commented 2 years ago

@immerrr I'm sorry for the delay. Here's the gist which can cause the bad performance. Just go to line 1497 and insert a newline. big_tbl.lua