Skip to content

Stream or batch SQLite exports to avoid full-result materialization #399

Description

@tomanizer

Problem

The SQLite export path materializes all rows in Python via fetchall() before writing them out. That is a memory-risky pattern and will scale poorly as export sizes increase.

Proposed change

  • replace fetchall()-style SQLite export generation with batched fetch/write logic
  • measure memory and latency impact using backend benchmarks or focused export tests

Likely files

  • server/export_service.py
  • export-related tests and benchmarks

Acceptance criteria

  • SQLite export path does not require materializing the full result set in memory
  • existing export API behavior remains correct
  • tests cover large-ish result export behavior

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions