GithubHelp home page GithubHelp logo

Comments (2)

tempora-mutantur avatar tempora-mutantur commented on September 23, 2024 1

Thank you for the response, I see the reasons you decided to avoid implementing it. At the moment we're using a similar approach with one you suggested with Build-Parallel. And what we found that there are many places which are not executed efficiently and the best approach to handle it is building this dependencies graph. What we see is making dependencies run in parallel would make our procedures faster 1.5 times. But I see how this increases tool's complexity significantly and if there's no that much demand this may not worth it. Thank you.

from invoke-build.

nightroman avatar nightroman commented on September 23, 2024

I started thinking about this feature from the year one of Invoke-Build, especially on development of Build-Parallel.
Because it looks somewhat natural, academically interesting, and "can do this" (probably, with some caveats).

Now it's the second decade of Invoke-Build and the feature is still not there :)
And full disclose, I am not planning it until I see frequent and solid use cases.

Reasons (excuses?)

(1) Many tasks are fast, running them all in parallel without thinking may be slower due to inevitable overhead of parallelism.

(2) Many tasks involve file reading and writing, parallel execution of them is not necessarily faster.

(3) Many tasks are formally independent by design and yet cannot be parallel.

Example: a script with by design independent tasks build, test.
They are independent because each of them may be invoked on its own.
Maybe not always, e.g. test cannot be run when nothing is built.
But when it's built one can and often runs just test (working on tests).

(4) Composing scripts knowing that every task is potentially parallel with who knows what (now or later when tasks are added or changed) is so much harder.
It is not possible to have a natural task build-and-test composed as build, test from example (3).
Not to mention constant thinking of shared state, variables, files, resources, etc.

What to do

Understand what tasks really consume build time and can be parallel, then make them parallel manually, e.g. by Build-Parallel.
Boring? Probably. But in reality this approach may work much better, save time including development, with less problems.
Note that problems in parallel scenarios are not always discoverable right away.

Use cases?

Like I said, if there are frequent and solid use cases... who knows... Do you have some "not too contrived", but ideally real, build script examples that might benefit from this feature?

from invoke-build.

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.