-
Notifications
You must be signed in to change notification settings - Fork 662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Potential memory leak while Gradle app build benchmark #6266
Comments
Thanks for opening this. |
@FireHook I could reproduce. There is a Gradle issue about this: gradle/gradle#18313 As a workaround, #6267 introduces It's a tradeoff though as the task may take a bit more time to start (forking, etc...). In the future, I'm planning to migrate the Gradle plugin to Gratatouille. This will give us more control over the classloader. We'll need to remove
Edit: no need for useProcessIsolation see comment below |
Update: we investigated this with @scana and ended with a more universal solution. Latest SNAPSHOTs do not need |
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Kotlin usage and allow us to serve you better. |
Version
Summary
I did the migration from Apollo
2.5.12
version with such dependencies:To Apollo
4.0.0
with such dependencies:I have noticed that Gradle Profiler throws
java.lang.RuntimeException: Multiple Gradle daemons were used.
exception during Gradle app build benchmarking usinggradle-profiler --gradle-user-home ../benchmark --benchmark --measure-config-time --profile buildscan --scenario-file scripts/buildprofiler/clean_build_scenario --output-dir apk_debug_build
, where clean_build_scenario is five times iteration of:app:assembleDebug
with--no-build-cache
and--no-configuration-cache
arguments.Further investigation shown that Memory leaks might be occurred.
Gradle Profiler Meatspace memory usage while app benchmarking with Apollo 2.5.12
Gradle Profiler Meatspace memory usage while app benchmarking with Apollo 4.0.0
As you can see from screenshots while Apollo 4.0.0 were used, the Meatspace memory used by Gradle increases within each iteration, so it looks like these are memory leaks.
I have tried updating Apollo to newer 4.1.0 version but the problem does not eliminate.
Could you, please, take a look what can cause the issue?
Steps to reproduce the behavior
No response
Logs
The text was updated successfully, but these errors were encountered: