manifold: When source code has errors: The Manifold plugins makes IntelliJ very slow (delay of 7 to 13s!)
I’m very sorry, keep writing about issues, I find manifold actually brilliant.
Describe the bug
For some days, I noticed that IntelliJ becomes very slow as soon as the code has errors.
Now, unfortunately, I was able to trace the problem back to the manifold plugin:
Ex. 1: No optional IJ Plugins are enabled: IJ is fast
I finally had time to disable all plugins - and then IJ is fast, see this example: I fix a bug in my code and return a string in the Code. You can see the characters while typing the returned string content:

Ex. 2: Just the Manifold Plugin 2021.2.17 is enabled: IJ gets lags
Now, I just enable the Manifold Plugin, 2021.2.17 (I’m pretty sure this bug crept in before version 2021.2.16). I fix the same bug in my code as above and return a string.
Maybe important: As soon as I start modifying null in "null", then IJ is blocked. Now, you can not see typing the characters in the returned string. After a delay of about 11s the complete return statement is displayed:

To Reproduce Steps to reproduce the behavior:
- I have sourcefiles with errors
Desktop (please complete the following information):
- OS Type & Version: Windows 10, 21H1, x64
- Java/JDK version: 1.8.0_162
- IDE version (IntelliJ IDEA or Android Studio): IntelliJ IDEA 2021.2 (Community Edition) Build #IC-212.4746.92, built on July 27, 2021
- Manifold version: 2021.2.17
- Manifold IntelliJ plugin version: 2021.1.16
Kind regards, Thomas
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 86 (37 by maintainers)
Commits related to this issue
- https://github.com/manifold-systems/manifold/issues/300 - replace Java's Proxy with our own that removes CheckCast instruction on return value if proxy returns a Structural interface type, otherwise i... — committed to manifold-systems/manifold by rsmckinney 3 years ago
- https://github.com/manifold-systems/manifold/issues/297 - avoid using manifold-ext features for modules not using manifold-ext https://github.com/manifold-systems/manifold/issues/290 - cache results ... — committed to manifold-systems/manifold-ij by rsmckinney 3 years ago
- https://github.com/manifold-systems/manifold/issues/306 - Support Java 17 https://github.com/manifold-systems/manifold/issues/290 - More performance-related changes targeting type resolution and compl... — committed to manifold-systems/manifold-ij by rsmckinney 3 years ago
- https://github.com/manifold-systems/manifold/issues/290 - cache properties augments, utilize cached augments from resolver — committed to manifold-systems/manifold-ij by rsmckinney 3 years ago
- https://github.com/manifold-systems/manifold/issues/290 - fix stack overflow prevention thing - call PsiAugmentProvider utility instead of calling findFieldByName — committed to manifold-systems/manifold-ij by rsmckinney 3 years ago
- https://github.com/manifold-systems/manifold/issues/290 - don't invoke field augmenter unless the field does not resolve, then re-resolve — committed to manifold-systems/manifold-ij by rsmckinney 3 years ago
- Provide a toggle for https://github.com/manifold-systems/manifold/issues/290 — committed to manifold-systems/manifold-ij by rsmckinney 3 years ago
- https://github.com/manifold-systems/manifold/issues/290 https://github.com/manifold-systems/manifold/issues/324 https://github.com/manifold-systems/manifold/issues/323 - don't reparse open java files ... — committed to manifold-systems/manifold-ij by rsmckinney 3 years ago
I think it is fixed!, thank you very much! 😄
Good evenin @rsmckinney
after many months I finally get back to developing SW with java and after two weeks of working, I didn’t have this tedious error anymore 😃. I am very happy you were able to fix it, thank you very much!
I also saw that Manifold is now free and so I hope that this licensing is also fair for you. I wanted to recommend Manifold in two commercial projects so that they then buy licenses 😃, but because of this issue here I had to wait and I was also not sure if / which Manifold components you rate as mature.
Thanks a lot for all your work, kind regards, Thomas
Good luck with your evaluation and let me know if you have questions. Cheers!
Yes, thank you.
Good evening @rsmckinney Please excuse my very slow reply, we had a successful attack on our servers at work and we were busy analyzing it for days. TOR is a great thing for persecuted people, but if an attack via TOR is successful, then it becomes very tedious…
Yes, that sounds good!, I noticed that despite my virtual machine snapshot I had problems reproducing the issue and that seems to me an important hint:
return null;in a function which returns String and then replacenullwith"my string".These are my test results
First this info: for each test, I proceeded like this:
My results:
Please let me know if there are any other combinations you would like me to test - this time I am confident I can do the tests within 24h.
Thanks a lot, kind regards & good success! Thomas
I think we’re good - the plugin (v2021.2.25) worked after clearing the intellij Cache, on Mac it is: rm -rf ~/Library/Caches/JetBrains/* This also works if you find Jetbrains getting confused after moving around and loading/unloading maven projects. I’ll be sure to update to 26 when it’s avail.
You’re latest update really improved the class size for our generated schema. Playing with it now but I believe this should really reduce the strain on Intellij: Version 2021.1.20: 272,420 bytes for schema.class Version 2021.1.23: 123,088 bytes for schema.class
Thanks! I’ll look at this tonight.
Thanks for all the effort in providing info for this, much appreciated. The zip file should be all I need to begin building a performance test. If nothing comes of the test, I may need your help regarding access to a snapshot of your vm. Cheers.
Hello @rsmckinney
Thank you for your feedback and suggestions!, just to note it: I have updated the Plugin to 2021.2.18
IJ Memory (Help » Change Memory Settings)
In the meantime, I have noticed that:
"string-content"public boolean test() { }then I do not have the lag.maven/gradle build
I don’t know the build configuration in detail (I just had imported an existing eclipse-project), but because I didn’t find a .gradle / *.gradle file, I guess I’m working with maven. After all I load Manifold via maven into my project 😃
My project has:
I have found these configuration files that refer to manifold:
I have added both files in this zip file: Project-Config-Files.zip
If it would help if you could look at the problem in my IDE
Then I could take a snapshot of the computer with my IDE (it’s a virtual machine), then you could access it with AnyDesk (I have the license) and experiment freely without anything being able to break.
I could also just briefly show you the project / problem, then you could act with or without me. I just have to have the promise that you do not copy the commercial library, which I can use for free. I’m pretty sure that’s not a problem, but I have to mention it anyway.
Thanks a lot, kind regards, Thomas