Status Update
Comments
uc...@google.com <uc...@google.com>
ac...@google.com <ac...@google.com> #2
je...@google.com <je...@google.com> #3
Alan, don't you have some facility in Studio to measure all the time spent between user requesting build and the APK pushed/ran on the device ? this would be useful to see where the gap comes from...
lo...@gmail.com <lo...@gmail.com> #4
It's possible that this is a Gradle issue, so I
ml...@google.com <ml...@google.com> #5
Most likely the problem is in AS being slow in processing events received from gradle. It is a known problem in the past.
There were significant improvements in this area since Bumblebee. I was just recently reviewing the similar bug b/228364163#2 and could not notice such significant difference. Though there is still some lag as events are processed asynchronously and it depends on the current load.
Build Analyzer should not be cause of a problem here, based on our benchmarks it does not have any significant impact. The line is printed in the end after this delay just because it is printed when Studio sees build complete, meaning when all Gradle events are processed.
Description
Issue
Everytime when build, the log will always says "Build finishes in X seconds", but then the actual build will take about X + 20 seconds. This not only happens to app build, but also detekt, test, etc.
Screen recording:https://youtu.be/pDKJ5sOhzjc
The only thing I can think of is maybe something in Build Analyzer is blocking, cause it's the only thing that outputs after gradle finishes. But I cannot find anyway to turn it off, so I can't verify this at all.
How to reproduce
Build: AI-203.7717.56.2111.7361063, 202105140516,
AI-203.7717.56.2111.7361063, JRE 11.0.10+0-b96-7249189x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 2560.0x1440.0
AS: Bumblebee | 2021.1.1 Canary 1; Kotlin plugin: 203-1.5.10-release-891-AS7717.8; Android Gradle Plugin: 7.1.0-alpha01; Gradle: 7.0.2; Gradle JDK: version 11.0.10; NDK: from local.properties: (not specified), latest from SDK: (not found); LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found)