Flow PHP

BatchSizeOptimization implements Optimization

FinalYes

The goal of this optimizer is to detect if there is a loader that supports batching and optimize pipeline to use it.

This optimization is only applicable for the pipelines with a default batch size (1).

Be default all extractors are yielding rows one by one, in that case loaders like for example DbalLoader would become a bottleneck because it would execute a single query for each row. This optimization will detect that and will wrap the pipeline with a BatchingPipeline.

Interfaces

Optimization

Methods

__construct()  : mixed
isFor()  : bool
optimize()  : Pipeline

Methods

__construct()

public __construct([int<1, max> $batchSize = 1000 ]) : mixed
Parameters
$batchSize : int<1, max> = 1000

        
On this page

Search results