Skip to content
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

find in path 经常卡死 #69

Closed
LiamYao opened this issue Oct 16, 2017 · 7 comments
Closed

find in path 经常卡死 #69

LiamYao opened this issue Oct 16, 2017 · 7 comments

Comments

@LiamYao
Copy link
Contributor

LiamYao commented Oct 16, 2017

有时是输入搜索词时卡死,有时是切换搜索结果条目时卡死
idea版本是2017.2.5 插件版本是1.1.9
以前也偶尔有卡死现象,最近越来越频繁了,invalidate caches后也不能解决,附上dump
threadDumps-freeze-20171016-095534-IU-172.4343.14.zip

@tangzx
Copy link
Member

tangzx commented Oct 16, 2017

搜索什么词?能不能重现?

@LiamYao
Copy link
Contributor Author

LiamYao commented Oct 16, 2017

我把最近在项目里加的几个太大的lua文件exclude掉似乎正常了,估计是find in path预览代码时,语法高亮之类的功能处理大文件或者解析特定lua代码结构时速度太慢了

@tangzx
Copy link
Member

tangzx commented Oct 16, 2017

有多大多少行?目前对于太大的文件是有性能上的问题

@LiamYao
Copy link
Contributor Author

LiamYao commented Oct 16, 2017

1w行左右,确实有点大。另外我们有一些代码生成的lua脚本(一般是将策划公式转成lua函数),也有一些性能问题,可以尝试把下面的代码粘帖到一个新建的lua文件里,我这边会卡死。也许和嵌套层次太多了有关。

local _f = function(v) return ((v:foo()) and v.id == 1) or (((v:foo()) and v.id == 2) or (((v:foo()) and v.id == 3) or (((v:foo()) and v.id == 4) or (((v:foo()) and v.id == 5) or (((v:foo()) and v.id == 6) or (((v:foo()) and v.id == 7) or (((v:foo()) and v.id == 8) or (((v:foo()) and v.id == 9) or (((v:foo()) and v.id == 10) or (((v:foo()) and v.id == 11) or (((v:foo()) and v.id == 12) or (((v:foo()) and v.id == 13) or (((v:foo()) and v.id == 14) or (((v:foo()) and v.id == 15) or (((v:foo()) and v.id == 16) or (((v:foo()) and v.id == 17) or (((((v:foo()) and v.id >= 18) and ((v:foo()) and v.id <= 19))) or (((v:foo()) and v.id == 20) or (((v:foo()) and v.id == 21) or (((v:foo()) and v.id == 22) or (((v:foo()) and v.id == 23) or (((v:foo()) and v.id == 24) or (((v:foo()) and v.id == 25) or (((v:foo()) and v.id == 26) or (((v:foo()) and v.id == 27) or (((v:foo()) and v.id == 28) or ((((v:foo()) and v.id >= 29) and ((v:foo()) and v.id <= 30))))))))))))))))))))))))))))) end

@tangzx
Copy link
Member

tangzx commented Oct 16, 2017

是的,类似这类解析有性能上的问题。

tangzx added a commit that referenced this issue Oct 16, 2017
@tangzx
Copy link
Member

tangzx commented Oct 16, 2017

已优化

@tangzx tangzx closed this as completed Oct 16, 2017
@freekkk
Copy link

freekkk commented Mar 8, 2019

确实挺严重的。我这边基本没法用全局搜索。一个字母 s 就直接干死了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants