Status Update
Comments
ju...@google.com <ju...@google.com>
rp...@google.com <rp...@google.com>
ad...@google.com <ad...@google.com> #3
I looked at it and I'm planning to remove the deduplicating lookup the callstack refers to. It should be no longer needed. How was the 80ms in
sp...@google.com <sp...@google.com>
sp...@google.com <sp...@google.com>
an...@google.com <an...@google.com> #4
com.google.protobuf.Descriptors$FileDescriptor.internalBuildGeneratedFileFrom(Descriptors.java)
com.android.build.gradle.internal.cxx.logging.CxxLogging.<clinit>(CxxLogging.java:82)
com.android.build.gradle.internal.cxx.logging.LoggingMessage.getDescriptor(LoggingMessage.java:110)
com.android.build.gradle.internal.cxx.logging.LoggingMessage.hashCode(LoggingMessage.java:489)
java.util.HashMap.hash(HashMap.java:340)
java.util.HashMap.containsKey(HashMap.java:592)
java.util.HashSet.contains(HashSet.java:204)
This logic was deduplicating messages (including chatty 'info' messages). This deduplication shouldn't be needed anymore so I removed it.
I don't know how the 80ms from
xa...@google.com <xa...@google.com> #6
We have not. That list of filter isn't even exhaustive as it was computed on a small project example. The results were positive but we should do more research to finalize this list.
sp...@google.com <sp...@google.com> #7
We should probably revert ag/24738251 while this is being done.
xa...@google.com <xa...@google.com> #8
I took a look at maven.google.com and I think the original list is fine.
There are some android.* and io.fabric.* but the last upload for this is 2019.
The only remaining one is org.chromium and I don't know that it's common enough to warrant being in the default filters. Maybe we should add it but comment it?
Description
New projects created in Dolphin/Chipmunk use the following block in
settings.gradle
:This is not very efficient as several repositories force Gradle to try all repositories in order until it finds a match. This can take a long time if the artifact is in the last repo so order is important. Each try is a network call which can be particularly slow.
We have heard reports that, for many people, the first experience of creating the first project in Studio can be slow. Therefore this is a something we should look at fixing (incrementally, there's no easy fix).
It is possible to add filtering to indicate what each repo includes or does not include. There are some limitations to the filtering, so we also need to look at how many artifacts are likely to be found in each repo. By far
gradlePluginPortal
will contain the fewest number of artifacts (only non-android plugins), and even though it does delegate tojcenter
to find most things not in the actual portal, this is not viable long term, sincejcenter
is now read-only. In addition, a bit of benchmarking indicates that the Gradle portal, maybe because of the redirect tojcenter
, is quite slow (slower than accessingjcenter
directly).The proposed new order and filtering is the following:
Reasoning:
includeGroupByRegex
only these artifacts, known to be there, will be searched in the google repo (*) so first place is the right location(*) note that there are many
com.google.*
artifact not on the google repo (but in the mavenCentral repo instead) but this block as about the plugin dependencies only so impact should be limited.Also note that there are other packages in the google repo but they are for project dependencies rather than plugin dependencies so we don't need them there. I will file a separate bug on setting up filtering for the other repository list.
We should fix this in both Dolphin and CM.