Skip to content

bug: concurrency option silently ignored in streaming API #207

Description

@l2ysho

Bug

streamPdfFile calls validateParameters (which validates and returns a concurrency value) but never uses the returned value. The streaming implementation always processes pages sequentially in a plain for loop regardless of the concurrency option passed by the caller.

Affected code

src/core.tsstreamPdfFile and its public wrappers (streamPdf2image, streamPdf2string, streamPdf2mixed).

Failure scenario

A caller passes { concurrency: 4 } to streamPdf2image expecting parallel page processing. The option passes validation with no error, but all pages still process one at a time. No warning is emitted and throughput is identical to concurrency: 1.

Options

  1. Implement parallelism in the streaming path (yield results in order, process pages in parallel).
  2. Reject the option with an error or warning when passed to the streaming API.
  3. Document that concurrency has no effect on the streaming API (least work, but still silently misleading).

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