object Fusing
This class holds some graph transformation functions that can fuse together multiple operation stages into synchronous execution islands. The purpose is to reduce the number of Actors that are created in order to execute the stream and thereby improve start-up cost as well as reduce element traversal latency for large graphs. Fusing itself is a time-consuming operation, meaning that usually it is best to cache the result of this computation and reuse it instead of fusing the same graph many times.
Fusing together all operations which allow this treatment will reduce the parallelism that is available in the stream graph’s execution—in the worst case it will become single-threaded and not benefit from multiple CPU cores at all. Where parallelism is required, the akka.stream.Attributes#AsyncBoundary attribute can be used to declare subgraph boundaries across which the graph shall not be fused.
- Source
- Fusing.scala
- Alphabetic
- By Inheritance
- Fusing
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
case class
FusedGraph
[+S <: akka.stream.Shape @scala.annotation.unchecked.uncheckedVariance, +M](module: FusedModule, shape: S) extends Graph[S, M] with Product with Serializable
A fused graph of the right shape, containing a FusedModule which holds more information on the operation structure of the contained stream topology for convenient graph traversal.
Value Members
-
def
aggressive[S <: Shape, M](g: Graph[S, M]): FusedGraph[S, M]
Fuse all operations where this is technically possible (i.e.
Fuse all operations where this is technically possible (i.e. all implementations based on akka.stream.stage.GraphStage) and not forbidden via akka.stream.Attributes#AsyncBoundary.
-
def
structuralInfo[S <: Shape, M](g: Graph[S, M], attributes: Attributes): StructuralInfoModule
Return the StructuralInfo for this Graph without any fusing
- object FusedGraph extends Serializable