lua-mode icon indicating copy to clipboard operation
lua-mode copied to clipboard

Really bad performance while edit big lua table.

Open moyotar opened this issue 3 years ago • 3 comments

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 avatar Feb 10 '22 07:02 moyotar

Inserting a newline cost 10+ seconds.

moyotar avatar Feb 10 '22 07:02 moyotar

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

immerrr avatar Feb 10 '22 08:02 immerrr

@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

moyotar avatar Mar 22 '22 03:03 moyotar