Coder Social home page Coder Social logo

Cache heuristics about gradle HOT 5 CLOSED

gradle avatar gradle commented on July 28, 2024
Cache heuristics

from gradle.

Comments (5)

pioterj avatar pioterj commented on July 28, 2024

Rather than making it configurable we could make it intelligent so that the system knows whether it's better to execute a task or get the result from the cache based on historical data.

from gradle.

pioterj avatar pioterj commented on July 28, 2024

Such mechanism could be later reused for distributed builds to decide whether it's worth to move execution of a task to a different machine or just execute it locally.

from gradle.

big-guy avatar big-guy commented on July 28, 2024

At the other end, instead of putting lots of smarts into Gradle, we could make it another diagnostic we produce. We're going to eventually be including metadata about where a particular artifact came from and providing more data for build scans. If we provided some or all of these things:

  • time taken to retrieve cached output
  • time taken to unpack output
  • time taken to create the output originally
  • time taken to execute the cached task (we already have this)

We could do a really simple diagnostic. If the time taken to execute the cached task is greater than the time taken to create the output originally and that time is greater than some threshold (10s), the build scan can say:

  • If the unpacking is the slow part, disable the cache for task XYZ because it takes too long to unpack.
  • If the retrieval is the slow part, speed up the connection to the distributed cache or disable caching for task XYZ.

If we had the task execution plan, we could even replay the build with the original, non-cached times. If the build would have finished sooner, we can suggest disabling the cache or speeding up the connection to the cache or speeding up the local disk (depending on what we can guess from the data).

from gradle.

stale avatar stale commented on July 28, 2024

This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution.

from gradle.

stale avatar stale commented on July 28, 2024

This issue has been automatically closed due to inactivity. If you can reproduce this on a recent version of Gradle or if you have a good use case for this feature, please feel free to reopen the issue with steps to reproduce, a quick explanation of your use case or a high-quality pull request.

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.