[GRADLE-1320] Optimize UP-TO-DATE check Created: 19/Jan/11  Updated: 01/Jun/16  Resolved: 01/Jun/16

Status: Resolved
Project: Gradle
Affects Version/s: 0.9.1
Fix Version/s: None

Type: Improvement
Reporter: Mathias Kalb Assignee: Unassigned
Resolution: Won't Fix Votes: 3


 Description   

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.


 Comments   
Comment by Lóránt Pintér [ 01/Jun/16 ]

Not relevant anymore

Generated at Wed Jun 30 11:52:34 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.