VSCode-EmmyLua icon indicating copy to clipboard operation
VSCode-EmmyLua copied to clipboard

Extension stalls while indexing

Open ipsquiggle opened this issue 6 months ago • 3 comments

I just installed the EmmyLua VSCode extension. It seems to stall during startup, just spinning infinitely in the toolbar. Performing any kind of direct action such as jump-to-definition or linting a file will also wait indefinitely.

Image

Attached is the log file and here's the last few lines for reference:

D_dsn_dsn-git_data_scripts.log


[2025-08-14 13:14:42 -07:00 INFO emmylua_ls::handlers::initialized] add workspace root: "D:/dsn/dsn-git/data/scripts"
[2025-08-14 13:14:42 -07:00 INFO emmylua_ls::handlers::initialized] add workspace root: "D:/dsn/dsn-git/source"
[2025-08-14 13:14:42 -07:00 INFO emmylua_ls::handlers::initialized::collect_files] collect_files from: ["D:/dsn/dsn-git/data/scripts", "D:/dsn/dsn-git/source"] match_pattern: ["**/*.lua"] exclude: ["**/.DS_Store", "**/.git", "**/.hg", "**/.svn", "**/Thumbs.db"], exclude_dir: []
[2025-08-14 13:14:45 -07:00 INFO emmylua_ls::handlers::initialized::collect_files] load files from workspace count: 1200
[2025-08-14 13:14:50 -07:00 INFO emmylua_code_analysis::profile] update files: cost 4.5225905s
[2025-08-14 13:14:50 -07:00 INFO emmylua_code_analysis::profile] module analyze: cost 2.0596ms
[2025-08-14 13:14:51 -07:00 INFO emmylua_code_analysis::profile] decl analyze: cost 1.3106548s
[2025-08-14 13:14:52 -07:00 INFO emmylua_code_analysis::profile] doc analyze: cost 599.0665ms
[2025-08-14 13:14:53 -07:00 INFO emmylua_code_analysis::profile] flow analyze: cost 644.8039ms

I'm unsure what else to check to diagnose this, please let me know what additional information I can provide!

ipsquiggle avatar Aug 14 '25 20:08 ipsquiggle

Judging from the file reading time, there are extremely large Lua files in your project. Some huge Lua configuration files may cause a sharp drop in performance. Although I have received many reports about this, no one is willing to provide the relevant files for bug fixing. I suggest you check for large Lua files in your project and exclude them using the ignore configuration. If this works, you may consider sending me the relevant files so I can fix the bug.

CppCXY avatar Aug 15 '25 02:08 CppCXY

Indeed! I have a 35MB data file that seems to represent the core issue. It's not even that complex, it just has some arrays with 4 million numbers in them. 😅 I have a dozen data files of this sort and they all stall the indexing process.

I'm not sure what the best way to send you this file is, github won't let me upload it. Would a dropbox link be okay?

Note: I have several large files that are around 18,000 lines long and the indexer finishes reasonably fast with them in the project, so it seems like the issues is the specific case in my data files of single enormous arrays is causing the main issue.

Let me know if this is sufficient, or I can try and provide more information.

ipsquiggle avatar Aug 16 '25 01:08 ipsquiggle

(Also to be clear, yes, ignoring these data files allows the plugin to start up correctly, thank you for the helpful and rapid reply! 🙏)

ipsquiggle avatar Aug 16 '25 01:08 ipsquiggle