AtomicKotlinCourse executing tests is too slow
I'm doing a Kotlin course, I've tried in IntelliJ Ultimate and IntelliJ Community, in two different computers, fresh installs, but the "executing tests" part is very slow.
Hardware information:
- First computer has Ryzen 7 5700G, 16GB RAM.
- Second computer has a Ryzen 3 5300U, 8GB RAM.
- Both computers have an SSD.
Software information:
- Operative system: Windows 10 Professional.
- IntelliJ Ultimate Edition v2022.3.1 with a legitimate license.
- IntelliJ Community Edition v2022.3.2.
- SDK: Oracle OpenJDK Version 17.0.5
- Kotlin version: 1.5.20 because that's the default version for the course. I tried changing it to more recent versions (1.8.10 and 1.7.21) but I still had the same issue.
Additional info:
On the first computer, even the most simple test like printing "Hello, Kotlin!" takes more than one minute, and on the second computer, the same test takes almost two minutes.
I don't know if tests are supposed to take that long but it really disrupts the working flow, I solve a test and then I have to wait a long time to check the results, or if I make a mistake and need to fix it, I have to wait even more time.
Please sign in to leave a comment.
Hello,
Can you share the log content in the tool window Build > Build Output with me when you click on the Check button?
Do you mean this?
Starting Gradle Daemon...
Gradle Daemon started in 1 s 583 ms
> Task :wrapper
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 9s
1 actionable task: 1 executed
> Task :util:compileKotlin NO-SOURCE
> Task :util:compileJava NO-SOURCE
> Task :util:processResources NO-SOURCE
> Task :util:classes UP-TO-DATE
> Task :processResources NO-SOURCE
> Task :util:compileTestKotlin NO-SOURCE
> Task :util:compileTestJava NO-SOURCE
> Task :util:processTestResources NO-SOURCE
> Task :util:testClasses UP-TO-DATE
> Task :processTestResources NO-SOURCE
> Task :compileKotlin
w: '-Xopt-in' is deprecated and will be removed in a future release, please use -opt-in instead
> Task :compileJava UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :compileTestKotlin
w: '-Xopt-in' is deprecated and will be removed in a future release, please use -opt-in instead
> Task :compileTestJava NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 43s
4 actionable tasks: 3 executed, 1 up-to-date
Hi,
Which version of JDK you've used in your project? You can view it in the menu File > Project Structure.
If you use JDK 17, it'll be very slow, if using JDK 8 or JDK 11, it will be fast in less than 20 seconds.
Please check if this is your case.
I tried running it with JDK 11.0.2 with language level 11 and 8 and got the same results, here's the build log:
> Task :wrapper
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed
> Task :util:compileKotlin NO-SOURCE
> Task :util:compileJava NO-SOURCE
> Task :util:processResources NO-SOURCE
> Task :util:classes UP-TO-DATE
> Task :processResources NO-SOURCE
> Task :util:compileTestKotlin NO-SOURCE
> Task :util:compileTestJava NO-SOURCE
> Task :util:processTestResources NO-SOURCE
> Task :util:testClasses UP-TO-DATE
> Task :processTestResources NO-SOURCE
> Task :compileKotlin
w: '-Xopt-in' is deprecated and will be removed in a future release, please use -opt-in instead
> Task :compileJava UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :compileTestKotlin
> Task :compileTestJava NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 55s
4 actionable tasks: 3 executed, 1 up-to-date
Would you mind collecting the IDE logs (Help | Collect Logs and Diagnostic Data), and uploading them (snapshot file and log files) to https://uploads.jetbrains.com/, provide their upload IDs here, and we will investigate it.
Hello, thanks for helping, this is the ID, I hope I uploaded the right files. Upload id: 2023_03_09_4aHGx12KD8FpRjUpXAPnhc
Sorry for being late.
This seems to be a known problem, but there is no obvious workaround:
https://youtrack.jetbrains.com/issue/IDEA-292510/The-log-is-full-of-Cannot-build-Gradle-model-for-module-X
It's planned to be fixed in 2023.1.
Feel free to watch the YouTrack item in order to be notified once it has updates. See this article if you are not familiar with YouTrack.
However, because it's caused by the Package Checker, as a temp workaround(please turn on it once you upgrade to 2023.1 in the future), you may try disabling this plugin to see if it fixed your issue: Settings/Preferences | Plugins | "Installed" Tab, input Package Checker, then disable it, then restart the IDEA to see if it fixed your issue.
I've tried this workaround and it makes the test so fast that it is usually less than 10 seconds.
Thanks for your replies, unfortunaly, disabling Package Checker didn't change anything for me, it still takes the same amount of time, but I appreciate your effort.