Build time, and runtime configuration start time very slow (IntelliJ 2024.2.x)
Build performance and starting a (tomcat) runtime configuration are a lot slower in IntelliJ version 2024.2. We have a fairly big project, and building/running it in the new version is unbearably slow.
In IntelliJ version 2024.1.6, building the project (via menu Build → Build project) takes 2 min, 17 sec.
Doing the same in 2024.2.1, the build takes 11 min, 3 sec.
(side question: This is a maven project, so we usually build it via the maven tab, but apparently to start the project it is still required that IntelliJ "builds" the project although it has just been built via maven…is there a way to skip this?..)
Then, starting the app via runtime configuration (Tomcat 10 server), in version 2024.1.6 takes ~ 13 sec.
In 2024.2.1, the start process hangs at “copying resources” for a module, and never actually starts (or at least, I never waited long enough…).
Comparing compiler settings, I could not find any differences between the versions. Are the any other settings I could check? Are there any known problems with the build system in 2024.2?
请先登录再写评论。
Hello!
Thank you for reporting this!
Based on the description, it looks like IDEA might be struggling with file system access.
Try resetting the IDEA's caches:
pom.xml
→ Open as ProjectPlease also note that new major version of IDEA uses new directories (i. e.
IntelliJIdea2024.2
instead ofIntelliJIdea2024.1
), so it may be treated as a new software by antiviruses / security solutions - please make sure that its' directories and processes are excluded from antiviruses / security solutions real-time scanning.And another thing: Tomcat Run Configurations by default include a
Build
“Before launch” task, which you can remove and replace with the Maven Lifecycle/Goal instead, which can be considered a workaround for the time being.If the issue persists, please share the logs (Help → Collect Logs and Diagnostic Data) and, if possible, the Project itself.
Hi,
thanks for the suggestions.
After this, I used the maven tab to build the project (mvn clean install).
I then used File → Invalidate Caches (all of them) and restart. After that, I closed IntelliJ completely, then deleted the build.log and the idea.log. Then I opened IntelliJ and the project again and used Build → Build Project. It again took over 11 min to build the project.
In the build.log, I could not see anything unexpected.
However, the whole idea.log is full of messages like this, for the target folder of literally every single dir in the project:
Could this be the issue, that IntelliJ tries to load/check target folders from the SVN unneccessarily?
The target folders are (obviously) not in Subversion, and should already be excluded (and the Subversion tab in IntelliJ doesn't show any “unversioned” folders/files, so I guess they are).
Is there a way to prevent this check, to see if it is the cause of the slowdown?
Yggramon Thanks for the update!
Could you please share the logs (Help → Collect Logs and Diagnostic Data), so I can take a closer look?
How/where can I upload log files? The editor here does not allow adding files? Can I send them to you directly?
Yggramon You can upload the files using our upload service.
Ahh, thank you. I uploaded the logs: Upload id: 2024_09_02_xXrTSc1WHxrzaJH7YRQnro (file: idea-logs-20240902-08441316432347550287037544.zip)
Yggramon Thank you for sharing the logs!
The SVN log messages don't seem to be relevant to the build performance issue.
Would you also be able to share the logs from 2024.1.6 version for comparison?
Have you noticed the build time increase for all Projects or only this one?
Would it be possible to share one of the affected Project?
+1 for this. Also very slow build compared to 2024.1.x
Matthew Griffiths Are are actively investigating the issue - would it possible to share an affected Project?
I've uploaded the logs from IntelliJ 2024.1.6: Upload id: 2024_09_03_Jas9vy6vjC2TRzWoRQKZbX (file: idea-logs-20240903-13010618248871911060769425.zip)
Procedure was the same as above:
This time, the build process only took ~ 26 sec! This is awesome but as I wrote in my initial post, it usually takes more time if we make changes in the project and then restart the tomcat runtime configuration.
Small update: In IntelliJ 2024.2.1 I disabled the Subversion plugin to see if that would have any effect. With that change, the build took ~ 7 min. A bit better, but still worlds worse than in the 2024.1.6 :(
Another bit of obvservation: During build, the build tab shows the following steps for every jar module: Parsing java, Writing classes, Adding nullability assertions, Adding pattern assertions, Updating dependency information. It feels like the last of those (updating dependency information) is the slow one.
I tested one other project in 2024.2.1 (the trunk version of the project above, which is a branch). Like above, I checked out the project into a new folder and opened that as new project in IntelliJ. Unfortunately, the build time is just as slow as before.
I don't have other bigger projects around to try, for small projects I didn't notice any problems so far (but build time is barely noticable there anyway).
Unfortunately the project above is not a private one, so I cannot share it. If you need information about the structure or other details, maybe I can provide that?
I'm experiencing the same issue here, which started in version 2024.2. I tested it now with version 2024.2.1, and the problem persists. My project uses JSF with MyFaces and Wildfly. I don't use a package manager (like Maven or Gradle); I run everything directly. My source code repository is on GitLab. In version 2024.1.6, the compilation took just a few seconds, but now it takes several minutes. The slowdown happens across all run targets, even when creating a simple class with the main method and running just that, it's still slow. The progress bar stays stuck at zero with the message 'Build,' and when the bar starts moving, the progress seems to be at normal speed.
Here is the build log. After the line `#o.j.k.j.b.KotlinBuilder - Total Kotlin global compile context initialization time: 51 ms`, it does absolutely nothing for 30 seconds. I checked the activity monitor, and it seems like the IDE is not doing anything during this entire period. This is the run target for a simple class, but when I run the Wildfly target, it takes several minutes.
So far, the issue has only occurred on machines with AMD Ryzen 3800x and 3600x processors. I just tested the same project on a machine with an Intel i5 1235U processor, and it compiled quickly.
This is the log running on the Intel processor:
Another difference is that the issue only occurred on machines with Windows 10. It worked fine on Windows 11.
Just to add to Paulo's comment above: My work environment is Windows 10 (Pro), so this problem does happen with Windows 10.
Thank you very much for sharing the logs and additional details about the issue!
To determine the root cause of the issue we would need a reproducer Project.
I understand that sharing the actual Projects can be challenging, we have an option to collect extended performance data locally as described below:
-Dprofiling.mode=true
flag to the Compiler's VM options.User Home Directory/Snapshots
.Help → Collect Logs and Diagnostic Data
).If possible, please run this on both 2024.2 and 2024.1 so we can compare and contrast.
Yggramon Do you have a Windows 11 machine available, so we can check if the issue is indeed specific to Window 10 only?
Sorry for the late answer. Some updates:
So it seems that indeed Windows 10 causes the problems with the new IntelliJ version.
I also tested the build with the plugin you mentioned above, without success. A notification appeared after the build, but when I clicked the “Open snapshot location” link, it opened my Documents folder? But there were no snapshots there (or any new files). I also found no snapshot files in the user folder (C:\Users\..), or any other likely location.
However, it seems that the plugin basically broke IntelliJ 2024.1.6, and caused the build to take > 30min. I've uploaded the logs (IntelliJ 2024.2.2 → Upload id: 2024_09_20_6iHGYHZ4hntTtafE8v4FK5 (file: idea-logs-20240920-11195314319646810191499734.zip), IntelliJ 2024.1.6 → Upload id: 2024_09_20_24KFYF6afjTvjbjm3HjyoC (file: idea-logs-20240920-1246322965617060658019565.zip)).
After uninstalling the plugin, build time in 2024.1.6 is back to normal. In 2024.2.2, the plugin seems to have made no difference, and the build took the “normal” > 11 min…
I will upgrade my PC to Windows 11 today or next week, and will then report if the build works for me then.
One more update: I've upgraded my PC to Windows 11 now, and can confirm that the build works fine for me now too. Building and starting the runtime configurations works as well as it did in 2024.1.6.
So, the problem appears to be caused by Windows 10.
Yggramon Thank you for the update!
We are looking into this - I'll keep you posted on the investigation's progress!