Giter Club home page Giter Club logo

Comments (3)

bamboo avatar bamboo commented on July 17, 2024 1

Thanks, @joshfriend, we'll get back to the this issue soon, I just wanted to clarify one point:

We are able to run task execution in parallel with CC turned off, I don't understand why this is a requirement when CC is enabled.

By isolating tasks, CC can enable intra-project parallelism while --parallel only enables inter-project parallelism.

from gradle.

mlopatkin avatar mlopatkin commented on July 17, 2024

Can you tell us more about what you perceive as a source of the overhead? We know about sequential dependency resolution, and will address this soon. Is the I/O in general a problem? Do you expect the machine to have enough memory to temporarily hold the cached state if needed?

The store operation is an essential step to prepare for the execution phase, to allow parallel task execution, for example. It doesn't really happen at the end of the build. Our end goal is to get rid of non-configuration-cached execution, so falling back to it won't be a long-term solution.

An alternative solution could be to fail the build if the cached state cannot be reused to indicate that cache-priming build has to be re-run. Does this behavior fit your use case?

from gradle.

joshfriend avatar joshfriend commented on July 17, 2024

Can you tell us more about what you perceive as a source of the overhead?

At one point, we had enabled configuration cache in our CI as a way to validate that our build was compatible with CC when updating gradle, but we found that this came at a ~10% performance penalty. For larger builds we would sometimes observe the storing of configuration cache to take >1m.

We are rolling out configuration caching to CI builds where we produce the cache in the main branch, and PR builds will restore the cache from the nearest commit ancestor on main that has cache available. In some cases, a developer has made a CC invalidating change and the cache we restore is not reusable. In these cases we would like to basically continue as if CC were disabled and not incur the cost of storing the new configuration to the cache.

Do you expect the machine to have enough memory to temporarily hold the cached state if needed?

Generally yes, we had one or two CI jobs in the build where configuration cache had to remain disabled because it caused OOMs, but we have been able to hold the state in memory for everything else.

The store operation is an essential step to prepare for the execution phase, to allow parallel task execution, for example

We are able to run task execution in parallel with CC turned off, I don't understand why this is a requirement when CC is enabled. I think I am missing some bit of knowledge here that would help this requirement make sense.

An alternative solution could be to fail the build if the cached state cannot be reused to indicate that cache-priming build has to be re-run. Does this behavior fit your use case?

Potentially,. We would have to check if the time taken to run the initialization twice with different settings would be faster than writing the configuration cache and discarding it. That doesn't seem great in general from a usability standpoint though.

from gradle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.