Hi. Probably I'm doing something wrong, but: - set...
# kotlin-toolchain
j
Hi. Probably I'm doing something wrong, but: • setting "compileIncrementally" causes intellij to scream "error" • does not change compilation time when I'm running from terminal
./amper run --mainclass=....
Do I need to do something more here?
j
About the first issue, could you please confirm that you're using IDEA 2025.3 Beta?
Regarding the second issue, could you please share your build logs? It would be super helpful, especially the telemetry traces
j
No, still on stable, I’ll check on beta
regarding reproducibility, it's here and I'm running
./amper run --main-class=ec2025.quest16.Quest16Kt
after reediting any of the strings in that file. I'll send you the logs in DM, if you don't mind
k
Hi Jakub! AFAIS, your project is a pure Kotlin project, right? At the moment, incremental compilation is implemented only for Java. Kotlin is planned as well, of course, but not there yet.
💯 1
j
Ahhh ok
I mean, it’s jvm, but kt files only, yes
k
Yeah, but the compilers are different so we have to write different code in Amper to make each of them incremental.
Also, the module contains only 56 files. On this volume the benefits of incremental compilation won’t be actually noticeable: both recompiling a single file and recompiling the whole module should be very fast anyway (~2 seconds, I’d say). But, as far as I understand, it is not the case for you. We definitely know at least one problem of Amper that can affect the issue: slow startup. It affects all operations, including build and run, and we are optimizing it right now. But there might be something else, so if you share your telemetry logs with Joffrey or with me, it would be great: we’ll check whether it is the startup problem or something different.
j
I sent logs to Joffrey via dm 🙂 Happy to help with further debugging.
👍 1
🙏 2
Also - the profiling in IntelliJ is also still on todo list, I assume?
j
We definitely know at least one problem of Amper that can affect the issue: slow startup. It affects all operations, including build and run, and we are optimizing it right now. But there might be something else, so if you share your telemetry logs with Joffrey or with me, it would be great: we’ll check whether it is the startup problem or something different
It's definitely the Kotlin compilation in this case:
@Jakub Gwóźdź as a workaround, I would suggest using separate modules for each "quest" in your project. It might seem overkill, but it would greatly improve the perf in your case I believe. I understand that creating new modules might seem like a "big thing", but one of Amper's principle is that it should be easy to modularize your app (in your case, it seems like several independent apps anyway). With the Amper layout, you shouldn't have more directories. Although I do understand that it means a bunch of extra module files, which might be a bit annoying (even 3-liners with a common template).
👍 2
When we add proper Kotlin incremental compilation, you will no longer have to do that, of course (although it wouldn't hurt to).
j
That’s idea worth considering 🙂
Question is - how many modules can IntelliJ conveniently handle 🙂
j
I leave this as an exercise to the reader 😂 Joke aside, I'm confident that it will easily handle the size of your project. The IntelliJ Ultimate repo itself has tons of modules (look at just the community part of it)
k
Yeah, IntelliJ will easily handle thousands of modules without any performance problems (related to the amount of modules). All modules of IntelliJ community are listed here, there are 1700+ of them.
j
😁