Skip to content

query: G2 within-ledger FROM path re-parses SPARQL up to 3× (cold-path) #1473

Closed

Description

@aaj3f

Deferred from PR #1462 review (N5, re-parse half). build_within_ledger_dataset (fluree-db-api/src/view/query.rs:97) parses via parse_and_validate_sparql (:652) for every SPARQL query, then parse_sparql_to_ir (:124) parses again → ≥2× for ALL SPARQL (even no-FROM); the FROM/dataset route (:103) adds one more → up to 3×. Cold-path (per-query, not per-row) so not a measured hot-path regression, but avoidable.

Fix direction: parse once, thread the AST/IR through the within-ledger-dataset + validate + lower path.

Acceptance: a single parse per query on both the FROM and no-FROM paths; behavior unchanged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions