before I report an issue to Android studio, i want...
# apollo-kotlin
a
before I report an issue to Android studio, i wanted to see if there is anything that apollo kotlin IDE plugin is doing on sync of the project. Ive noticed nearly every time I sync in the IDE, a floating gradle daemon is kept alive and a new one is started next time i build, causing memory thrashing and slowdowns of gradle. Ive set arguments to code generation to a much lower memory number but the daemon seems to hog same size as my project gradle settings. I turned off automatic code generation while ide is running, but daemon still pops up. what made me think its an apollo bug, because I see logs (in đź§µ )
log in IDE
it shows up every time i use
--stop
command. and only resolves when I restart the IDE, but on restart, the daemon is resurfaced unless I stop it when IDE opens
Screenshot 2025-09-17 at 11.07.45 AM.png
(our project gradle settings allow gradle memory to be
Copy code
org.gradle.jvmargs=-Xmx16g -XX:+UseParallelGC -XX:MaxMetaspaceSize=16g -XX:-UseGCOverheadLimit
my global settings on my computer allow 32G
Copy code
org.gradle.jvmargs=-Xmx32g -XX:+UseParallelGC -XX:MaxMetaspaceSize=16g -XX:-UseGCOverheadLimit
my guess is global gradle is causing this issue. but im not entirely sure
b
đź‘‹ You have
Contribute configuration to the GraphQL plugin
checked, right?
âž• 1
There are 2 things: 1. fetching your project’s configuration - this executes Gradle when you open the project / when you do a sync 2. code generation - this executes Gradle in continuous mode For 1. the intent is that it should be able to re-use whatever daemon is already running. If that’s not the case, it’s worth opening an issue. For 2. since this is running in continuous mode, the daemon is “busy” and cannot be re-used, so the result is that you should probably see 2 daemons. I’m not sure what is causing yet another daemon to spawn when you build though.
a
yes i have the configuration contribution checked. it happens even when automatic code generation is off. just verified by restarting IDE. Ill add debug log for apollo in IDE category, to see if there is more information
b
Thanks a lot 🙂
if you'd like to open an issue the repo is now here
a
for(1) does that intentionally try to reuse open gradle daemon?
b
it's using the IDE's APIs that are supposed to do that - but I'm guessing something may not work as expected there
a
so ive noticed a "busy" lock on the initial daemon is held as long as the plugin is active. disabling the plugin frees up the daemon to "IDLE" this allows building post-sync to reuse daemon
so something the plugin is doing or getting stuck on is holding a busy signal
b
interesting! This should only happen for the codegen - so if you've disabled it, that's unexpected.
a
yeah code gen off, was able to repro on restart of IDE. only fix was turning off apollo plugin entirely. I will open an issue then
b
thanks!