Comments (5)
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.
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.
There is a section called "Performance discussions" in the docs that should answer those questions. :)
from gen_stage.
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.
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)
- Link required for ConsumerSupervisor? HOT 3
- Change default child :restart to :transient in ConsumerSupervisor HOT 1
- Doc typo in min_demand paragraph HOT 2
- ** (FunctionClauseError) no function clause matching in GenStage.Streamer.handle_info/2 HOT 11
- Release 0.14.2? HOT 2
- Dialyzer Error In GenState.async_subscribe/2 HOT 1
- [Feature request] add from ref to handle_demand. HOT 1
- Dialyzer error in GenStage.sync_subscribe/3 when using custom options HOT 1
- Version 0.14.3 released? HOT 1
- Question about ConsumerSupervisor HOT 2
- Init callback return option :subscribe_to looks too restrictive HOT 9
- Compilation error due to lackness of GenStage dependency HOT 2
- New release HOT 4
- `Endpoint.config_change/2` causes `undefined handle_info` HOT 6
- Improve documentation for GenStage.PartitionDispatcher HOT 1
- Usage of rate-limiter example is unclear HOT 4
- no function clause matching in GenStage.maybe_producer_cancel/2 HOT 2
- Fix CI
- Issue changing demand on-the-fly HOT 3
- There is typo in docs of GenStage module.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gen_stage.