GithubHelp home page GithubHelp logo

Comments (5)

josevalim avatar josevalim commented on June 3, 2024

Stages exchange data in batches. For such a small Enumerable, the whole data will be sent in a single batch. Partitioning changes it because the batches are spread based on the integer (although it still batches).

You will see parallelism for large enumerables or if you start a Flow with Flow.new and set :max_demand to 1.

from gen_stage.

josevalim avatar josevalim commented on June 3, 2024

It is also worth noticing that Flow works better for CPU bound parallelism. After all, we start the same amount of partitions as the number of cores. If you are going to be IO bound, then you can increase the default number of stages via Flow.new as well.

from gen_stage.

josevalim avatar josevalim commented on June 3, 2024

There is a section called "Performance discussions" in the docs that should answer those questions. :)

from gen_stage.

rafbarr avatar rafbarr commented on June 3, 2024

Ok. I'm officially stupid. I should have read more of the documentation before opening the issue. Sorry about that and thanks for the quick reply.

from gen_stage.

josevalim avatar josevalim commented on June 3, 2024

Ok. I'm officially stupid.

Not at all. :D GenStage.Flow is quite new so asking questions is part of the process!

from gen_stage.

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.