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!
I have the same issue. A fix is it planed or a workaround ? This version is unusable for me.
Laurent Guiraud Unfortunately, we have not been able to reproduce the issue on our end yet.
Could you please collect and share the troubleshooting data as described in my earlier post.
If possible, please do that for both 2024.2 and 2024.1 (can be installed side-by-side).
You can upload the data using our upload service.
Same with the version 2024.2.4.
I followed the steps but my “C:\Users\<me>\Snapshots” remains empty. I've tried to create it manually and run Intellij as admin.
I uploaded the plugin log for the last build run.
Upload id: 2024_10_24_2AY2zTyEXwzFP2eGJGc5CA (file: ExternalBuild-5892.log)
Laurent Guiraud Thank you for sharing the logs!
May I ask you to run the build on the same Project in IDEA 2024.1 and 2024.2 and the logs (
Help → Collect Logs and Diagnostic Data
), so we can get a full picture of what's going on there?2024.2.4 :
Help → Collect Logs and Diagnostic Data
is freezing…So I made a zip of the hole log directory : Upload id: 2024_10_24_qm1Sy7BhBQN3hDTWkNZVdN (file: idea-log.zip)
I don't know what's happening between those 2 lines in build.log (more than 2 minutes) :
2024-10-24 15:52:45,034 [ 4454] INFO - #o.j.j.i.IncProjectBuilder - Cleaned output directories in 33 ms
2024-10-24 15:54:29,209 [ 108629] INFO - #o.j.j.b.j.d.Mappings - Mappings total differentiate linear time 0 ms
Much more faster with 2024.1.7 (logs collection from ide is still freezing).
Logs :
Upload id: 2024_10_24_WAgNC3aVuzcLXnVWM1XxoP (file: build-log-2024.1.7.zip)
I'll stay on that version for now.
Laurent Guiraud Thank you for sharing the logs!
Can you please check if the issue persist for you in the current IDEA EAP, also check the build process settings (Settings -> Build, Execution, Deployment -> Compiler -> "Build Process" section) and make those settings are identical between 2024.1 and 2024.2?
Can I also ask you to enable the extended logging for the build component of IDEA by uncommenting the following lines from the
build-log-jul.properties
:so it looks like this:
And re-run the build in 2024.1 and 2024.2?
Hello,
My OS was stuck in Win 11 21H2 and Windows updates were not giving any other updates.
Since I successfully upgraded to Win 11 24H2, I don't have this problem anymore with IntelliJ 2024.2.4.
I suspect without to be sure that my Win 11 (which was a Win 10 migration) was having a trouble somewhere.
I hope this will help.
Thank you for you ti.
Hello,
on windows 10 I still have problems with slow builds. I did performance profiling with visualVM and maybe will help you to debug the problem.
Thread dump of thread with max cpu time: