Vladimir Tagakov
02/22/2023, 2:44 AMprocess
function and should be freed after exiting. So it is highly unlikely that there is a memory leak on our side 😞
We are comparing Kotlin + javac annotation processing with Kotlin + KSP annotation processing and the difference in peak memory consumption for the whole build is:
• For Kotlin+Javac: 39.5 Gb
• For Kotlin+KSP: 62.5 Gb
Both setups are using Bazel
workers, to verify that it is a memory leak we changed strategy to local
(which is basically starts new instance of kotlinc for every module instead of using long running daemons) and the memory usage felt back to normal values (still slightly more with KSP but tolerable)
Can someone help me with triaging this issue and give me a clue how to run some diagnostics so I’ll be able to create a proper bug report?
Was fixed by: https://github.com/google/ksp/pull/1067yigit
02/22/2023, 2:46 AMVladimir Tagakov
02/22/2023, 2:47 AMyigit
02/22/2023, 2:48 AMVladimir Tagakov
02/22/2023, 2:49 AMyigit
02/22/2023, 4:08 AMVladimir Tagakov
02/22/2023, 4:22 AMCodeGenerator#createNewFile
reduces memory footprint as well. Our setup doesn’t support incremental compilation so it doesn’t make sense to do so. If anyone is interested I can measure the impact of it.Jiaxiang
02/22/2023, 7:55 AM