Will adding configuration cache help with AS sync ...
# gradle
u
Will adding configuration cache help with AS sync time (when switching build variant from the ui)?
p
At some point it should. Not at the moment, according to docs
Note that syncing a build from an IDE doesn’t benefit from the configuration cache, only running tasks does.
https://docs.gradle.org/current/userguide/configuration_cache.html#config_cache:ide
u
So... does this only apply to command line then? The santa sample leads me to believe it should help my day to day AS work
p
It doesn’t matter if you are executing gradle from shell or from ui button. Everything gradle runs benefits from configuration cache. Most of the things are delegated to gradle as build system. Things like assemble/compile are run through gradle when you “build” inside of the studio so benefit from all gradle optimizations. Starting from AS4.2 jvm tests are running through gradle test runner. Starting from AS7.1 android tests are running through gradle test runner. It just studio sync doesn’t run (only) gradle so… generating .idea, .iml, building internal model, indexing does not run gradle so these parts doesn’t benefit.
u
Yea, but running commandline is always a bit slower.. maybe its the daemon being used implicitly by AS and not on command line?
p
Could describe more what is slower? I don’t think it is expected to observe a difference running same task
u
Yea its psychological sincd As doesnt print the seconds of configuration, thanks