Is there a future for configure-on-demand in a cc/...
# configuration-cache
c
Is there a future for configure-on-demand in a cc/project-isolation world? For projects that have a large up-front configuration time out configure-on-demand still have impacts for non-cached configuration runs? Just curious if there's been any plans (I've seen the Deprecate configure-on-demand ticket, but it doesn't seem like any particular fate was decided).
t
we use CoD with CC (not yet IP), and it still works. However, your question made me pause to consider our current situation. I don't actually think we're getting much value out of CoD anymore. We use https://github.com/joshfriend/spotlight, which is a kind of custom CoD that ensures only those projects necessary for a given build are `include()`ed at all. We discuss that and more in this blog post Note that, even though the post is focused on IDE performance, it is relevant for general build performance as well
j
you're not even gonna tag me? 😜 configuration-on-demand was at one point disabled if isolated project is enabled due to "correctness issues" and I think it might still be, so part of my intention behind spotlight was to fix this if that decision became permenant
another limitation of regular configuration cache is that even with configure-on-demand enabled, a change to the build file of a project outside the dependency graph of the target task will cause a cache miss, and limiting the
include
-ed projects to strictly the necessary set fixes this and has raised our CC hit rate
t
lol I thought about it but for some reason forgot you were in this slack 😄
p
You can have both (serial IP and configure on demand)
Without IP, Gradle configures the projects serially, because you can do cross configuration. With IP configures all projects in parallel, because it is safe with IP (no cross configuration), but big projects might profit from configuring on demand instead of parallel IP.
c
but big projects might profit from configuring on demand instead of parallel IP
So about this I'm wondering if configure-on-demand could would in conjunction with parallel IP, only configuring what's needed but in parallel.
p
To evaluate the task graph, you need to configure the projects. So, yeah, in theory, you could find the requested projects serially and configure the required projects later in parallel.
But it's not yet implemented.
And as always, configure on demand only works with absolute task names/paths, but it does not warn otherwise.