Parallel processing
polars-bio runs in parallel on top of Apache DataFusion. A single global setting — datafusion.execution.target_partitions — controls the degree of parallelism for both sides of a pipeline: reading input files and running interval/range operations.
Parallel engine 🏎️
Set the degree of parallelism with the datafusion.execution.target_partitions option, e.g.:
Tip
- The default value is 1 (parallel execution disabled).
datafusion.execution.target_partitionsis a global setting and affects all operations in the current session — both reading files and running range operations.- Check available strategies for optimal performance.
- See the other configuration settings in the Apache DataFusion documentation.
The same setting drives both:
- Input reads — files are split into partitions that are decoded in parallel (index-based region splitting, parallel BGZF decoding). See Parallel reads & partitioning for the per-format behavior.
- Range operations —
overlap,nearest,count_overlaps,coverage, and the other genomic operations process partitions across threads.
So raising target_partitions speeds up the whole pipeline — from scanning the input files through to producing the interval-operation results — without any per-call configuration.