Skip to content

[Feature] Optimize get -q with phased pagination concurrency across providers #50

@mbe24

Description

@mbe24

Problem

99problems get -q currently paginates search results sequentially across providers. For multi-page queries, end-to-end runtime becomes dominated by page-by-page network waiting.

Design

Implement phased pagination optimization for -q:

  1. parallelize safe page-number/offset endpoints with bounded in-flight requests,
  2. keep deterministic output ordering,
  3. handle token/cursor-based endpoints conservatively (pipeline or sequential fallback),
  4. preserve existing error categories and behavior.

Scope

  • Add internal bounded pagination scheduler for query/search paths.
  • Roll out phased search pagination optimization across providers.
  • Preserve deterministic emit order by page/index.
  • Keep existing provider auth/rate-limit/error semantics.
  • Add tests and trace-level diagnostics for pagination scheduling behavior.

Boundary

  • No new CLI flags/config keys in this phase.
  • No by-id hydration/comment-pagination changes in this issue.
  • No aggressive fan-out for token/cursor-constrained endpoints.

Acceptance Criteria

  • Multi-page -q runs show lower wall-clock time in representative scenarios.
  • Emitted conversation ordering stays stable and deterministic.
  • Search result completeness remains unchanged versus baseline.
  • Error categories/exit codes remain consistent with current behavior.
  • Tests and pedantic clippy checks pass.

Context

Recent provider hydration parallelization delivered measurable improvements. Query pagination is the next latency bottleneck for larger searches and is a natural follow-up optimization area.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestperformanceSpeed and resource-usage improvementspriorityImportant work that should be tackled soon

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions