Skip to content

perf: SqlTransform creates new tokio runtime per batch #126

@strawgate

Description

@strawgate

Severity: MEDIUM (performance + blocks async migration)

SqlTransform::execute() at transform/lib.rs:568 creates a new tokio::runtime::Builder::new_current_thread() and calls block_on() for every batch. This adds ~100us per batch and will panic when the pipeline migrates to async (cannot call block_on() from within a tokio worker).

Fix

Accept a tokio::Handle from the pipeline. Cache the SessionContext across batches (confirmed safe — SessionContext reuse works with schema changes). Only re-register the MemTable per batch.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestperformancePerformance optimization

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions