I profiled the UP-TO-DATE and found, that a new compileJava was faster
than the UP-TO-DATE check.
I called "gradle clean" and then twice "gradle --profile build" and the
first "compileJava" takes "2:11" and the second takes "2:14".
Ideas from Adam:
- Perform the checks asynchronously, so that we are invalidating queued tasks while executing another task.
- Aggregate tasks together and check only the inputs and outputs of the aggregate, rather than intermediate files. For example, in the case of project dependency, you generally only care if the jar is up-to-date wrt its transitive inputs. You don't care if a class file has been deleted or changed, as it is essentially a temporary file for the purposes of building the jar.
- Often, the output of one task is the input to another task (or tasks). We can merge the checks into a single pass.
- The daemon can listen for file system changes, and invalidate tasks in the background. We should be able to end up with a pre-built model, with the checks already performed.
|