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?

1

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:

  1. Close all instances of IDEA
  2. Rename or remove the System Directory
  3. Re-import the Project: Open → Navigate to Project's directory → Double-click the root pom.xml → Open as Project

Please also note that new major version of IDEA uses new directories (i. e. IntelliJIdea2024.2 instead of IntelliJIdea2024.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.

0

Hi,

thanks for the suggestions.

  • I renamed the existing system directory (%LOCALAPPDATA%\Jetbrains\IntellijIdea2024.2, it was re-created after the next IntelliJ start)
  • I checked the project out in a new folder and opened that as a new project
  • In IntellIJ, I already followed the program's suggestion to add the system dirs and project dir to the windows defender exclusion list

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:

2024-09-02 09:50:33,163 [ 591740]   INFO - #o.j.i.s.c.CommandRuntime - Detected warning - svn: warning: W155010: The node 'D:\SVNRepository\branches\Rel_2902\clinixx1.0\Login\target\classes\de' was not found.

2024-09-02 09:50:33,202 [ 591779]   INFO - #o.j.i.s.s.CmdStatusClient - Status requested not in working copy. Command - svn --config-dir C:\Users\ip.PC-IP-WIN10-64\AppData\Roaming\Subversion st D:\SVNRepository\branches\Rel_2902\clinixx1.0\Login\target\classes\de --depth infinity --no-ignore --xml. Result - <?xml version="1.0" encoding="UTF-8"?>
<status>
<target
  path="D:\SVNRepository\branches\Rel_2902\clinixx1.0\Login\target\classes\de">
</target>
</status>

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?

0

Yggramon Thanks for the update!
Could you please share the logs (Help → Collect Logs and Diagnostic Data), so I can take a closer look?

0

How/where can I upload log files? The editor here does not allow adding files? Can I send them to you directly?

0

Yggramon You can upload the files using our upload service.

0

Ahh, thank you. I uploaded the logs: Upload id: 2024_09_02_xXrTSc1WHxrzaJH7YRQnro (file: idea-logs-20240902-08441316432347550287037544.zip)

 

0

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?

0

+1 for this.  Also very slow build compared to 2024.1.x

0

Matthew Griffiths Are are actively investigating the issue - would it possible to share an affected Project?

0

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:

  • update project from SVN
  • build project via maven tab (clean install)
  • invalidate all caches via File menu, and restart
  • exit and delete build.log and idea.log
  • open project again, then Build → Build Project
  • collect log data

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 :(

0

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?

0

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.

0

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.

 

2024-09-05 14:16:01,507 [ 147859]   INFO - #o.j.j.i.IncProjectBuilder - Building project; isRebuild:false; isMake:true parallel compilation:false; dependency graph enabled:false
2024-09-05 14:16:01,507 [ 147859]   INFO - #o.j.k.j.b.KotlinBuilder - is Kotlin incremental compilation enabled for JVM: true
2024-09-05 14:16:01,507 [ 147859]   INFO - #o.j.k.j.b.KotlinBuilder - is Kotlin incremental compilation enabled for JS: true
2024-09-05 14:16:01,507 [ 147859]   INFO - #o.j.k.j.b.KotlinBuilder - is Kotlin compiler daemon enabled: true
2024-09-05 14:16:01,507 [ 147859]   INFO - #o.j.k.j.b.KotlinBuilder - Label in local history: build started 7cb291ed
2024-09-05 14:16:01,523 [ 147875]   INFO - #c.i.u.i.i.MapIndexStorageCacheProvider - SLRU-cache will be used for indexes
2024-09-05 14:16:01,648 [ 148000]   INFO - #o.j.j.i.IncProjectBuilder - Cleaned output directories in 28 ms
2024-09-05 14:16:01,711 [ 148063]   INFO - #o.j.k.j.b.KotlinBuilder - KotlinTargetsIndex created in 32 ms
2024-09-05 14:16:01,730 [ 148082]   INFO - #o.j.k.j.b.KotlinBuilder - Total Kotlin global compile context initialization time: 51 ms
2024-09-05 14:16:31,538 [ 177890]   INFO - #o.j.j.i.j.JavaBuilder - Compiling 1 java files; module: GeraApps
2024-09-05 14:16:32,226 [ 178578]   INFO - #o.j.j.i.Builder - Dependency analysis found 0 affected files
2024-09-05 14:16:32,585 [ 178937]   INFO - #o.j.j.c.BuildSession - Build duration: Builder 'Java' took 621 ms; 1 sources processed (621 ms per file)
2024-09-05 14:16:32,601 [ 178953]   INFO - #o.j.j.i.j.JavaBuilder - javac 17.0.2 was used to compile [GeraApps]
2024-09-05 14:16:32,978 [ 179330]   INFO - #o.j.j.b.j.d.Mappings - Mappings total differentiate linear time 0 ms
2024-09-05 14:16:32,978 [ 179330]   INFO - #o.j.j.b.j.d.Mappings - Mappings total integrate     linear time 0 ms
2024-09-05 14:16:32,978 [ 179330]   INFO - #o.j.j.c.BuildSession - FilePageCache stats: pageHits=20, pageFastCacheHits=1042, regularPageLoads=93, pageLoadsAboveSizeThreshold=0, pageLoadUs=32731, pageDisposalUs=61, capacityInBytes=503316478, disposedBuffers=93 maxRegisteredFiles=61 maxCacheSizeInBytes=37552128totalSizeCachedBytes=0
2024-09-05 14:16:33,319 [      0]   INFO - #o.j.j.c.BuildMain - ==================================================
2024-09-05 14:16:33,335 [     16]   INFO - #o.j.j.c.BuildMain - Build process started. Classpath: C:/Program Files/JetBrains/IntelliJ IDEA/plugins/java/lib/jps-launcher.jar
2024-09-05 14:16:33,538 [    219]   INFO - #o.j.j.c.BuildMain - Connection to IDE established in 184 ms
2024-09-05 14:16:33,554 [    235]   INFO - #o.j.j.c.JpsModelLoaderImpl - Loading model: project path = C:/CiaporteMain/DriveK/Fontes/ClipEscola, global options path = C:/Users/Paulo/AppData/Roaming/JetBrains/IntelliJIdea2024.2/options
2024-09-05 14:16:33,824 [    505]   INFO - #o.j.j.j.m.i.JpsJavaeeModuleExtensionSerializerBase - Unknown config file id: context.xml, relative output path is set to META-INF
2024-09-05 14:16:33,824 [    505]   INFO - #o.j.j.j.m.i.JpsJavaeeModuleExtensionSerializerBase - Unknown config file id: context.xml, relative output path is set to META-INF
2024-09-05 14:16:33,867 [    548]   INFO - #o.j.j.c.JpsModelLoaderImpl - Model loaded in 310 ms
2024-09-05 14:16:33,867 [    548]   INFO - #o.j.j.c.JpsModelLoaderImpl - Project has 47 modules, 42 libraries
2024-09-05 14:16:33,991 [    672]   INFO - #c.i.u.i.PageCacheUtils - File page caching params:
2024-09-05 14:16:33,991 [    672]   INFO - #c.i.u.i.PageCacheUtils - 	DEFAULT_PAGE_SIZE: 10485760
2024-09-05 14:16:33,991 [    672]   INFO - #c.i.u.i.PageCacheUtils - 	Direct memory to use, max: 713031680
2024-09-05 14:16:33,991 [    672]   INFO - #c.i.u.i.PageCacheUtils - 	FilePageCache: regular + lock-free (LOCK_FREE_PAGE_CACHE_ENABLED:true)
2024-09-05 14:16:33,991 [    672]   INFO - #c.i.u.i.PageCacheUtils - 	NEW_PAGE_CACHE_MEMORY_FRACTION: 0.20000000298023224
2024-09-05 14:16:33,991 [    672]   INFO - #c.i.u.i.PageCacheUtils - 	Regular FilePageCache: 503316478 bytes
2024-09-05 14:16:33,991 [    672]   INFO - #c.i.u.i.PageCacheUtils - 	New     FilePageCache: 125829122 bytes (+ up to 10.0% overflow)
2024-09-05 14:16:33,991 [    672]   INFO - #c.i.u.i.PageCacheUtils - 	DirectByteBuffers pool: 0 bytes
2024-09-05 14:16:34,210 [    891]   INFO - #o.j.j.c.BuildMain - Pre-loaded process ready in 885 ms
0

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:

2024-09-05 14:45:01,903 [ 402334]   INFO - #o.j.j.i.IncProjectBuilder - Building project; isRebuild:false; isMake:true parallel compilation:false; dependency graph enabled:false
2024-09-05 14:45:01,903 [ 402334]   INFO - #o.j.k.j.b.KotlinBuilder - is Kotlin incremental compilation enabled for JVM: true
2024-09-05 14:45:01,903 [ 402334]   INFO - #o.j.k.j.b.KotlinBuilder - is Kotlin incremental compilation enabled for JS: true
2024-09-05 14:45:01,903 [ 402334]   INFO - #o.j.k.j.b.KotlinBuilder - is Kotlin compiler daemon enabled: true
2024-09-05 14:45:01,903 [ 402334]   INFO - #o.j.k.j.b.KotlinBuilder - Label in local history: build started 5ddcba5c
2024-09-05 14:45:01,950 [ 402381]   INFO - #c.i.u.i.i.MapIndexStorageCacheProvider - SLRU-cache will be used for indexes
2024-09-05 14:45:02,198 [ 402629]   INFO - #o.j.j.i.IncProjectBuilder - Cleaned output directories in 47 ms
2024-09-05 14:45:02,354 [ 402785]   INFO - #o.j.k.j.b.KotlinBuilder - KotlinTargetsIndex created in 64 ms
2024-09-05 14:45:02,386 [ 402817]   INFO - #o.j.k.j.b.KotlinBuilder - Total Kotlin global compile context initialization time: 96 ms
2024-09-05 14:45:02,805 [ 403236]   INFO - #o.j.j.i.j.JavaBuilder - Compiling 1 java files; module: GeraApps
2024-09-05 14:45:03,888 [ 404319]   INFO - #o.j.j.i.Builder - Dependency analysis found 0 affected files
2024-09-05 14:45:03,935 [ 404366]   INFO - #o.j.j.c.BuildSession - Build duration: Builder 'Java' took 998 ms; 1 sources processed (998 ms per file)
2024-09-05 14:45:03,935 [ 404366]   INFO - #o.j.j.c.BuildSession - Build duration: Builder 'NotNull instrumentation' took 61 ms; 0 sources processed
2024-09-05 14:45:03,950 [ 404381]   INFO - #o.j.j.i.j.JavaBuilder - javac 17.0.10 was used to compile [GeraApps]
2024-09-05 14:45:03,989 [ 404420]   INFO - #o.j.j.b.j.d.Mappings - Mappings total differentiate linear time 16 ms
2024-09-05 14:45:03,989 [ 404420]   INFO - #o.j.j.b.j.d.Mappings - Mappings total integrate     linear time 16 ms
2024-09-05 14:45:03,989 [ 404420]   INFO - #o.j.j.c.BuildSession - FilePageCache stats: pageHits=21, pageFastCacheHits=1041, regularPageLoads=90, pageLoadsAboveSizeThreshold=0, pageLoadUs=43728, pageDisposalUs=133, capacityInBytes=503316478, disposedBuffers=90 maxRegisteredFiles=61 maxCacheSizeInBytes=37388288totalSizeCachedBytes=0
2024-09-05 14:45:04,282 [      0]   INFO - #o.j.j.c.BuildMain - ==================================================
2024-09-05 14:45:04,300 [     18]   INFO - #o.j.j.c.BuildMain - Build process started. Classpath: C:/Program Files/JetBrains/IntelliJ IDEA 2023.3.5/plugins/java/lib/jps-launcher.jar
2024-09-05 14:45:04,583 [    301]   INFO - #o.j.j.c.BuildMain - Connection to IDE established in 257 ms
2024-09-05 14:45:04,601 [    319]   INFO - #o.j.j.c.JpsModelLoaderImpl - Loading model: project path = K:/Fontes/ClipEscola, global options path = C:/Users/paulo/AppData/Roaming/JetBrains/IntelliJIdea2024.2/options
2024-09-05 14:45:04,893 [    611]   INFO - #o.j.j.j.m.i.JpsJavaeeModuleExtensionSerializerBase - Unknown config file id: context.xml, relative output path is set to META-INF
2024-09-05 14:45:04,893 [    611]   INFO - #o.j.j.j.m.i.JpsJavaeeModuleExtensionSerializerBase - Unknown config file id: context.xml, relative output path is set to META-INF
2024-09-05 14:45:04,924 [    642]   INFO - #o.j.j.c.JpsModelLoaderImpl - Model loaded in 321 ms
2024-09-05 14:45:04,924 [    642]   INFO - #o.j.j.c.JpsModelLoaderImpl - Project has 47 modules, 42 libraries
2024-09-05 14:45:05,120 [    838]   INFO - #c.i.u.i.PageCacheUtils - File page caching params:
2024-09-05 14:45:05,120 [    838]   INFO - #c.i.u.i.PageCacheUtils - 	DEFAULT_PAGE_SIZE: 10485760
2024-09-05 14:45:05,120 [    838]   INFO - #c.i.u.i.PageCacheUtils - 	Direct memory to use, max: 713031680
2024-09-05 14:45:05,120 [    838]   INFO - #c.i.u.i.PageCacheUtils - 	FilePageCache: regular + lock-free (LOCK_FREE_PAGE_CACHE_ENABLED:true)
2024-09-05 14:45:05,120 [    838]   INFO - #c.i.u.i.PageCacheUtils - 	NEW_PAGE_CACHE_MEMORY_FRACTION: 0.20000000298023224
2024-09-05 14:45:05,120 [    838]   INFO - #c.i.u.i.PageCacheUtils - 	Regular FilePageCache: 503316478 bytes
2024-09-05 14:45:05,120 [    838]   INFO - #c.i.u.i.PageCacheUtils - 	New     FilePageCache: 125829122 bytes (+ up to 10.0% overflow)
2024-09-05 14:45:05,120 [    838]   INFO - #c.i.u.i.PageCacheUtils - 	DirectByteBuffers pool: 0 bytes
2024-09-05 14:45:05,435 [   1153]   INFO - #o.j.j.c.BuildMain - Pre-loaded process ready in 1142 ms

 

0

Another difference is that the issue only occurred on machines with Windows 10. It worked fine on Windows 11.

0

Just to add to Paulo's comment above: My work environment is Windows 10 (Pro), so this problem does happen with Windows 10.

0

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:

  1. Install the YourKit Profiler for IDE Performance Testing Plugin (Settings → Plugins → Marketplace).
  2. Add the -Dprofiling.mode=true flag to the Compiler's VM options.
  3. Run the build.
  4. When run completes you should get pop-up message in the lower-right corner that the snapshot has been saved. The snapshots are saved to User Home Directory/Snapshots.
  5. Upload the snapshot and the logs folder (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?

0

Sorry for the late answer. Some updates:

  • The latest IntelliJ update (2024.2.2) has not brought any improvement
  • We installed IntelliJ 2024.2.2 on a co-worker's Windows 11 PC and tested the build with the same procedure as I described above. Build time for the project was normal (< 2min) and the runtime config with Tomcat could start without problems

So it seems that indeed Windows 10 causes the problems with the new IntelliJ version.

0

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.

0

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.

0

Yggramon Thank you for the update!

We are looking into this - I'll keep you posted on the investigation's progress!

0

请先登录再写评论。