-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
IntelliJ becomes slow when using nest anonymous functions #580
Comments
It's a side-effect of having to do a negative look-ahead to stop the current stab operation when the next one starts and that this look-ahead looks like a normal expression due to no parentheses clause heads. There's no separator for stab operations unlike Erlang, which has To do that in the plugin's grammar I have to do a negative look-ahead,
-- intellij-elixir/src/org/elixir_lang/Elixir.bnf Line 2239 in 825344d
-- intellij-elixir/src/org/elixir_lang/Elixir.bnf Lines 2236 to 2238 in 825344d
The native parser doesn't have to (and I don't think can because it uses yecc) do a negative look-ahead because it's format allows it to cheat: it allows the implementation to rearrange how the parse tree is returned
I've posted a question to the OpenAPI forums, so maybe someone at JetBrains can explain a better way to write the grammar. |
Cool, tnx for taking a look! |
Any update on this? |
JetBrains responded, but I didn't really find it that helpful. Too general. I've asked some more questions on one of the approaches today to see if I can get more concrete answers. Just because I can find why it's slow does not mean I know how to fix it. This is parser design and optimization and I am barely good at grammar design (look at the first year of the git log). Feel free to read up on GrammarKit (the parser generator the plugin is using), Pratt and LL parsers to see if I missed some feature of GrammarKit that will make this faster. |
Look at the execution test variance for Fn1 vs Fn8.
Versions
macOS
10.12.2
Elixir
1.3.4
IntelliJ
intellij-elixir
4.7.0, zip file from Releases tab.
Reproduce steps
Code:
Problem
Responsiveness to the "Enter" key.
The text was updated successfully, but these errors were encountered: