How to optimize --refresh-dependencies?


(danlew42) #1

I’m trying to figure out a problem right now - it seems like Android Studio is constantly refreshing dependencies, which is causing syncs to take forever.

Part of the reason that takes forever is because the refresh itself takes a long time. It takes so long because it’s trying every repository to find resources, but (for example) one of the repositories is only present in order to satisfy a single dependency, but every unfound dependency is checked against it.

This wouldn’t be so bad except Android has a bunch of resources that can only come out of Android’s private local m2 repo, which seems to be checked last.

Anyways - is there a way to optimize for this problem? Like reducing the timeout for dependency searches, or specifying which repository provides which dependency?