-
-
Notifications
You must be signed in to change notification settings - Fork 354
无法提示ipair中的的类型 #435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
怎么手动更新最新版? |
自己手动替换文件/应用更改 |
pairs 也有同样问题 |
pairs暂时只支持 |
替换之后报这个错误
|
这个一般是你的代码比较复杂,搜索深度达到上限了(也有可能是插件bug导致搜索时发生了死循环)。如果不影响结果的话无视即可。 |
项目代码,不好分享。 替换前是没这个问题的,替换后解析文件会超级慢。 |
你可以尝试做个演示脚本 |
嗯,我试试 |
可不可以通过添加日志定位下问题? 我发现只要代码多一些基本就一直卡在:正在诊断状态,lua-language-server进程使用的内存能达到 4G, 还继续增长,并且跑满了一个核CPU |
听起来很有可能是死循环了,我加一些限制试试 |
cc6ec7e |
替换了你刚才发的最新的, 我们项目300多个lua文件,每个1k-30K, 改动一行代码, 2分钟左右才诊断结束。 |
在你第一次手动更新这个issue提到的问题前,诊断速度是合理的对吗? |
vscode 只调整过文件大小限制 其它配置是默认的, 确认了下 速度值是 |
替换了你刚才发的最新的, 还是会出现 一直在诊断某个文件, cpu 20%, 内存缓慢增长,15分钟涨到了1GB |
我还在尝试复现这个问题,先不要应用我的新提交 |
试试这个提交 |
还是很慢
|
建议用 hash 来处理超长队列, table.remove(t, 1)的方式算法复杂度是n平方 local queue = {h = 1,t = 0}
---push
local t = queue.t + 1
queue.t = t
queue[t] = {}---value
---push
---pop
if queue.h > queue.t then
-- queue is empty
queue.h = 1
queue.t = 0
---reutrn nil
else
-- pop queue
local h = queue.h
local value = queue[h]
queue[h] = nil
queue.h = h + 1
---return value
end
---pop
|
不确定你说的是什么意思,插件代码中并没有这样的用法 |
ast.lua:1432 行, local func = tableRemove(exp, 1), 不确定你这个exp 是否是个超长数组,table.remove(t, 1)的方式算法复杂度是n平方,会极大影响性能 |
我贴的那段代码是用 hash模拟队列 ,算法复杂度不会随着元素变多n平方增长 |
你说的这个地方长度有多大,取决于你 |
感觉和 #437 这个问题差不多 |
#437 (comment) 提供了一个演示项目,我在1.17.3中修复了,不过依然有人表示他用1.17.3打开这个项目有问题。不确定是真的有问题还是他自己侧错了,你也来测试一下看看? |
我试试 |
我这里依然很慢,一直显示正在诊断中 |
|
此 issue 标题的部分已经修复,关于性能问题请单独开个新的 issue ,并提供上述测试的日志,谢谢! |
好的,有空我重新开个,这几天github上不去
发自我的iPhone
在 2021年3月5日,上午11:20,最萌小汐 <notifications@github.com> 写道:
此 issue 标题的部分已经修复,关于性能问题请单独开个新的 issue ,并提供上述测试的日志,谢谢!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#435 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADDQZK26RF64PYQ6QNE7S73TCBEYTANCNFSM4YOLXNRA>.
|
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: