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:

IntelliJ, without optional plugins

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:

IntelliJ, just with manifld plugin

To Reproduce Steps to reproduce the behavior:

  1. 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

Most upvoted comments

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…

so I would say start with 2021.2.16 and work backwards until it’s gone. Sound good?

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:

  1. As I reported, I can reproduce the problem if I have return null; in a function which returns String and then replace null with "my string".
  2. Interestingly, I don’t have the problem with all functions. But luckily I found the same function as reported in this issue and in it I could reproduce the problem reliably again.

These are my test results

First this info: for each test, I proceeded like this:

  1. Download the previous Manifold Plugin Release and install it in IJ
  2. Rebuild the Project and wait until done
  3. Restart IJ and wait until everything is idle
  4. Start the test and measure the time until IJ gets the CPU to display the the typed string
  5. Now, downgrade the Manifold Library to the Manifold Library and repeat step 2 to 4

My results:

Test  Manifold Plugin   Manifold Library   Delay
#1    2021.2.25         2021.1.25           8s » you really fixed an issue! :-)

#2    2021.2.16         2021.1.25          19s
#3    2021.2.16         2021.1.16          19s

#4    2021.2.15         2021.1.16          1s to 2s (this is not disturbing at all)

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.

Hi @djchapm. That’s a big graphql schema. I’ve been meaning to slim down the generated graphql schema and query classes on the order of 10x or more. I’m hoping perhaps most of the issues relating to the lag on some large codebases is the sheer size of some of the generated schema classes, graphql or otherwise. Stay tuned.

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 past, in my IJ I had set to use 1750 MiB
  • Today, I changed it to use 10000 MiB Unfortunately, the behaviour of the lag has not changed, it has about the same duration.

In the meantime, I have noticed that:

  1. I have the lag not only with errors in the source code but also during normal work with IJ. But then I cannot force the error, it just happens quite often (every few minutes) and most often if I change string content: "string-content"
  2. As you know, if I fix a string return statement (as described above), then I always / still have the lag.
  3. But if I fix simple missing return statements for e.g. booleans, numbers, …, like in this code: 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:

  • 4 modules (with 98% of all the code files) without manifold references.
  • 1 module called ‘nehemia’ with manifold references

I have found these configuration files that refer to manifold:

  • .idea\libraries\systems_manifold_manifold_exceptions_2021_1_16.xml
  • \nehemia\nehemia.iml

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