-
-
Notifications
You must be signed in to change notification settings - Fork 331
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
[Library] A native Luals parser #2910
Comments
is there a performance comparison with the existing parser? |
The libraries and design concepts used come from rust-analyzer, and it can be said to be a Lua port of rust-analyzer's parser. Although it has not been extensively tested, I can confirm that it is not too slow. Using the Rowan library for tree construction, it can share many identical nodes, so the memory usage will not be significant |
I'm more concerned about memory usage |
Don't worry, I have extensive experience. Memory usage will definitely not be an issue once it's release. |
yes,I'd like to run it in my termux environment as my tablet has a lot of memory and I hope it performs very well. |
Is this an attempt to make LuaLS faster or to be a complete rewrite? I am unsure if replacing just the parser is a well thought through approach, as LuaLS uses AFAIK LPeg to parse Lua syntax , which is already native and fast. For a proper speed improvement, I'd recommend profiling the LuaLS to see which parts actually need optimizing. Did someone profile the language server? |
It's not just about parsing, storage efficiency is more important. I am not just trying to make LuaLS faster; I am rewriting a language server. The important work is already done, and now it's just about gradually adding features. I can share some data. Currently, it processes very quickly and uses very little memory, approximately only 8% of LuaLS's memory usage. I will make an announcement when the language server is complete |
What? Compared to Lua, the memory usage is only 8%?Looking at my luals taking up more than 1G of memory, and now stuttering vscode. I'm looking forward to your work more and more.
…---- Replied Message ----
| From | ***@***.***> |
| Date | 12/15/2024 19:59 |
| To | ***@***.***> |
| Cc | ***@***.***>***@***.***> |
| Subject | Re: [LuaLS/lua-language-server] [Library] A native Luals parser (Issue #2910) |
Is this an attempt to make LuaLS faster or to be a complete rewrite? I am unsure if replacing just the parser is a well thought through approach, as LuaLS uses AFAIK LPeg to parse Lua syntax , which is already native and fast. For a proper speed improvement, I'd recommend profiling the LuaLS to see which parts actually need optimizing. Did someone profile the language server?
It's not just about parsing, storage efficiency is more important. I am not just trying to make LuaLS faster; I am rewriting a language server. The important work is already done, and now it's just about gradually adding features. I can share some data.
Currently, it processes very quickly and uses very little memory, approximately only 8% of LuaLS's memory usage. I will make an announcement when the language server is complete
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
I have completed most of the work, but there may still be many bugs in the details that I will gradually fix in future use. I will implement a new language server based on this. If you are interested, you can continue to follow my progress.
the library: https://crates.io/crates/emmylua_parser
a simple example:
The text was updated successfully, but these errors were encountered: