Closed paulluap closed 1 year ago
arithmetic expressions have the same issue: Take the expression below:
-1-1-1-1-1-1-1
It looks like the number of times
org.eclipse.xtext.xbase.typesystem.computation.XbaseTypeComputer._computeTypes(XAbstractFeatureCall, ITypeComputationState)
gets invoked increases exponentially with the number of '-'.
We use a slightly modified version of the template language https://www.eclipse.org/Xtext/documentation/207_template.html where this problem also occurs with larger files, (i.e. a lot of feature calls). Are there any updates on this issue or can anybody point me to some further informations on this? Kind regards, Pete
Xtext 2.14
Sorry, no news on that. I would recommend to refactor the code to avoid these deep nestings. I doubt that we have capacity to fix this for 2.14. But if you like to help we would support in reviewing PRs. Starting point would be to examine why XbaseTypeComputer._computeTypes is called that often and if caching somewhere is valid. It is not a trivial thing, though.
Thanks for your fast reply. I will try to look into your suggested starting point.
Closed as wont-fix. Feel free to reopen at github.com/eclipse/xtext
It seems that when an xbase expression is deeply nested with feature calls, the performance is poor. The following xbase expression in op will always block the IDE:
//file: test.dmodel
This can be reproduced using the example dmodel project.