diff options
author | sumneko <sumneko@hotmail.com> | 2019-04-12 16:37:33 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-04-12 16:37:33 +0800 |
commit | cc998b964d577832bc6ddbd5d17560391497fb76 (patch) | |
tree | 0338f99f571466c3cafbb00eecc5141a95060668 /server/src/vm | |
parent | 9297dd189945e8019c4598ad3eb082059ab4a3e7 (diff) | |
download | lua-language-server-cc998b964d577832bc6ddbd5d17560391497fb76.zip |
不再排序;如果以后有排序需求,缓存排序结果并用版本标记
Diffstat (limited to 'server/src/vm')
-rw-r--r-- | server/src/vm/value.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/server/src/vm/value.lua b/server/src/vm/value.lua index 06a86e23..d765883e 100644 --- a/server/src/vm/value.lua +++ b/server/src/vm/value.lua @@ -424,9 +424,10 @@ function mt:eachInfo(callback) infos._count = #list infos._limit = infos._count * 1.1 + 10 infos._version = listMgr.getVersion() - table.sort(list, function (a, b) - return a._sort < b._sort - end) + --local clock2 = os.clock() + --table.sort(list, function (a, b) + -- return a._sort < b._sort + --end) local passed = os.clock() - clock if passed > 0.1 then log.warn(('eachInfo takes: [%.3f]sec, #list: %d'):format(passed, #list)) |