Skip to content

Annotation lane selection is wrong in both arms: a categorical guard decides for bound subjects, and the cost model picks the slower lane on every case we can grade #1878

Closed

Description

@aaj3f

Separate from the filter-pushdown issue, and present with no filter in the query at all — which is what makes it the more consequential of the two, and it wasn't in the original survey.

DefaultGraphSourceOperator picks among three lanes (fluree-db-query/src/default_graph_source.rs:60-162). FLUREE_ANNOTATION_LANE=arena|enumerate|chain pins the choice, so the same query can be timed on each. 60,000-edge ledger, sealed arena, root policy, zero novelty, runs interleaved round-robin with a stats-counter COUNT as a common-mode control (process start plus ledger open) subtracted:

SELECT (COUNT(*) AS ?n) WHERE { ?s ex:knows ?o {| ex:confidence ?c |} }
lane median minus control
auto — i.e. arena, what the planner picks 184.8 ms 163.7 ms
enumerate 140.5 ms 119.4 ms
chain 59.4 ms 38.3 ms

With FILTER(?c > 0.97) the ordering is identical: 190.4 / 147.6 / 64.5 ms minus control. So the planner is choosing a lane about 4.3× slower than one already sitting there implemented.

The arithmetic

choose_chain_lane (default_graph_source.rs:101) computes

arena_cost = edge_first + min(edge_first, total_leaves) * LEAF_ROW_EQUIV
           = 60,000 + 14.65 × 400   = 65,860
chain_cost = probe_first * SEQUENTIAL_ROW_EQUIV
           = 60,000 × 2             = 120,000

and picks arena. The model charges the arena lane roughly one row-equivalent per base edge and the elided chain two per reifier. Measurement says the arena lane's real per-row cost is about four times the chain's, not half — so the model isn't slightly mis-tuned, it has the ordering inverted.

The implication is the thing I'd want read first: a 4.3× lane gap sitting underneath a 4.9× measured tax against RDF 1.1 reification means the annotation tax is largely a lane-selection bug rather than an intrinsic cost of the encoding. That's a meaningfully better story than the one we'd been telling ourselves, and it changes what we should conclude about annotations as a carrier — they are not inherently the slow option, they are currently being run the slow way.

A second gap in the same lane

A second gap in the same lane — corrected; the mechanism was wrong

The observation stands and the explanation I gave for it was wrong, so I would rather correct it in place than leave it to be rediscovered.

Observed: with the filter correctly planned inside the chain — --explain reports body-filters: 1 — and the bounds threaded down to build_scan_or_join (fluree-db-query/src/execute/where_plan.rs:1832), the arena lane's fuel is byte-identical at every threshold.

Not because the bounds are ignored. batched_row_matches_object_bounds (fluree-db-query/src/join.rs:2120) decodes each value and skips non-matching rows, and the batched path calls it at :2026. The bounds are applied.

They are applied as a post-visit filter on a subject-ordered walk. The walk is SPOT, so a predicate on the object cannot narrow which rows are visited, only which survive — and fuel charges rows the scan emits. Scan work is irreducible here by construction, not by omission. The asymmetry shows up in the eligibility functions too: is_batched_eligible (:311) does not consult bounds at all, while its sibling is_batched_object_eligible (:343) takes has_object_bounds and uses it to decline.

So this is not a scan/join-layer gap to be closed by wiring bounds through. It is the access path: the bound-subject body lookup is subject-ordered, and an object predicate only pays off on an object-ordered one. That is the same reason the companion pushdown fix measures −18.4% where the filter reaches an object-ordered path and −4.1% where it does not.

Filing it here rather than separately because whoever measures the lane will already be in this code.

A methodological note for whoever takes this

Fuel and wall-clock disagree on the lane ranking, and fuel is the wrong instrument here. Fuel makes enumerate cheapest (61) and chain dearest (721.03); the clock makes chain cheapest by 4.3×. Fuel prices leaflet touches and emitted rows, and does not price the CBOR row decode and dictionary re-encodes that ENUMERATE_ROW_EQUIV = 12.0 exists precisely to capture. Use wall-clock for anything about lane choice — fuel will confidently point you at the wrong lane. (For the pushdown question in the companion issue, fuel is exactly right and the clock is too noisy. Different questions, different instruments.)

Why this was not just fixed

LEAF_ROW_EQUIV / SEQUENTIAL_ROW_EQUIV / ENUMERATE_ROW_EQUIV were calibrated against a large private benchmark corpus that is not available in this repository, and their doc comments cite specific shapes from it — P2, P11, P22, P23, C7, C10, IC5. Re-fitting them against one synthetic corpus would trade those workloads for this one, which is why the companion PR deliberately left this alone rather than taking the easy 4.3×.

The part worth stating plainly, because it changes how actionable this issue is: that corpus is private to its author, so nobody else can run it at all. It is not in this repository, has never been in CI, and there is no public fixture at that scale — FULL_ARENA = Some(21_400_294.0) (fluree-db-query/src/default_graph_source.rs:949) is sized to it, which is the tell. So validating a re-fit is a request to one specific person, not a plan anyone here can pick up and schedule. Anyone taking this on and going looking for the fixture will not find one, and I'd rather they read that here than discover it.

And routing around it does not work — that is now tested rather than assumed. A synthetic fixture was built specifically to hit the quadrant neither available corpus covers: low average fan-out with one hub subject, 20,000 singletons plus one subject carrying 3,345 annotated edges, where the gate reads 1.167 against a true hub fan-out of 3,345 — understated by a factor of 2,867. Across three variants, at the quietest load of the session, the gate was not falsified; the chain lane was faster every time.

That result validates nothing, and I want to be clear about why rather than bank it as reassurance. The fixture never reaches the cost regime the guard exists for: the recorded arena is 21.4M reifiers over roughly 5,200 leaves, the synthetic one is 23,345 over about six, and the arena lane's dominant cost is whole-leaf decodes that barely exist at that size. Adding predicate diversity to provoke the sum-of-squared-out-degree behaviour did not move it either. fluree/benchmark-db cannot stand in for it either — four suites, none with a reified or annotated corpus, and FLUREE-GAPS.md:126 explicitly rejects adding one (pokec_to_ttl.py:16 emits "plain triples (no reifier bundles)").

So both routes are closed, and that is the finding: the corpus is unobtainable, and a synthetic fixture at reachable scale demonstrably cannot reproduce the regime — the guard's cost profile needs an arena roughly three orders of magnitude larger. Validating a re-fit is a run by whoever holds that corpus, or it does not happen.

Amended: one of the two routes has partly reopened. An independent corpus does exist and is already local — LDBC SNB Turtle sf1 and sf3. It is a better comparator than anything synthetic here because its knows edges are already reified: pers933 snvoc:knows _:knowsN, with _:knowsN snvoc:hasPerson <target> and _:knowsN snvoc:creationDate <dateTime>. Converting that to an RDF 1.2 annotated edge is transcription rather than a modelling choice made to suit whatever rule is being tested, and creationDate plays the body-property role. It also has the skew the synthetic fixture cannot: out-degree max 814 over 8,250 subjects at sf1 and 1,027 over 20,830 at sf3, against a mean of 21.9 and 27.1 — where the generator used here builds a circulant graph with fixed offsets, giving every subject exactly three edges and zero variance on the one axis any skew-aware rule turns on.

What remains closed is narrower and should be stated as such: SNB answers the topology question and not the arena-scale one. Its arena would be ~180k reifiers at sf1 and ~565k at sf3, against the ~21.4M where this guard's cost profile is claimed to live. So a re-fit can now be tested against real topology, and still cannot be validated in the regime the guard exists for.

The in-repo substitute has holes of its own, which compounds it. The recorded lane-shape fixtures (default_graph_source.rs:1171) do not pin two of the three lane decisions: choose_chain_lane makes its reifier_bound and subject_bound calls as categorical early returns before any cost comparison, and deleting the reifier_bound guard leaves that test green, because those assertions reach Chain through the cost model anyway. So the honest position is that the calibration corpus is unobtainable and the in-repo substitute is partly vacuous — both want addressing before anyone can be confident a re-fit is safe. The substitute half has its own issue; see the companion.

Worth knowing that there is also no way to make lane choice selectivity-aware today even if someone wanted to: PropertyStatData (fluree-db-core/src/stats_view.rs:131) carries count, ndv_values and ndv_subjects and no numeric range or histogram, so a range-bounded triple cannot be estimated below its full row count. A selectivity-aware model is a stats-layer change first.

Related: #1797 — which proposes exactly that stats-layer change, and whose relationship to this issue has now been checked rather than assumed, because it is the obvious place to look for a fix and the obvious conclusion is wrong.

#1797's most-common-values sketch is keyed on o_hash, and that is the right axis: the statistic this issue's bound-subject guard lacks is a per-object-value count on f:reifiesSubject, since <s> sits in that pattern's object position. It would also arrive at the right place with no change to the lane code — annotation_chain_probe_rows (planner.rs:1157) reaches estimate_triple_row_count, whose BoundObject arm (:223-227) returns the count / ndv_values that #1797's first bullet names. The one mismatch is capacity: a Misra–Gries certificate is N/(k+1) and the decision boundary here works out to a fixed fraction of the arena, so the requirement is k ≈ 154 independent of ledger size, against the 64 #1797 specifies. For an elided chain 64 already suffices.

It is nonetheless not a blocker, and this issue should not be held for it. A better probe_first is a better input to the cost model, and the model is inverted on all three cases where it can be graded — including this issue's own headline table, where it computes arena 65,860 against chain 120,000 and the clock says chain is 4.3× faster. Repairing an input to a formula with a sign error does not fix the formula. So: related, sequenced independently, neither blocking the other.


Caveats

Wall-clock only, on a 16-core box shared with other builds whose 1-minute load sat between 12 and 32 all session — there was no quiet floor available. Every timing is interleaved with a subtracted control and the load is stated at each point (19.4 before / 18.6 after for the table above). The ratios are the result; I wouldn't defend a single absolute millisecond. SPARQL only, synthetic 60k-edge corpus, Cypher not benchmarked.

Activity

  1. added
    bug
    P2
    area:query
    performance
    on Sep 16, 2026
  2. aaj3f commented on Sep 17, 2026

    @aaj3f
    ContributorAuthor

    A bench box has re-measured all of this on quiet hardware, and a laptop measurement has qualified when it is reachable. Most of what is filed here survives; two figures need withdrawing, one needs turning into a range, and one finding puts a hard constraint on the fix this issue proposes that I did not see coming.

    The constraint on the fix — read this part first

    I proposed teaching the cost model to prefer the chain lane. That is not safe as stated, because the lane that rescues traversals is the worst available one on a realistic aggregate.

    Answer-matched across all three carriers — "edges whose source document is trusted above T", identical rows (3 / 7 / 24,198), content-hash verified — per lane, load 0.22 flat:

    shape annot arena annot chain annot enumerate reification named graph
    1-hop 6.86 ms 1.18 ms 1.21 ms 1.27 ms 1.15 ms
    2-hop 18.04 ms 1.46 ms 1.36 ms 1.53 ms 1.87 ms
    COUNT 3,288 ms 3,826 ms 285 ms 21.5 ms 12.4 ms

    On the COUNT the chain lane is worse than the arena lane it would replace (3,826 against 3,289), the best lane is a third one — enumerate at 285 ms, 11.5× better than what the planner picks — and even that best case is 13× reification and 23× named graphs.

    So: any lane change scoped to choose_chain_lane has to be evaluated on this shape, not only on traversals. A chain-preference shipped on the traversal evidence alone would regress a realistic attributed-claims aggregate. Three regimes, three different right answers, and the discriminator has to separate all three rather than two.

    What this does to the claims already in the issue

    Two figures I should withdraw rather than defend. The original carrier table's traversal rows compared against comparators that returned zero rows, so they were never a comparison. And the 251× aggregate compared against a stats counter answering a different question in O(1); no join can match that, so the number meant nothing. Both should come out of anything that cites them.

    The aggregate multiple is a range, not a point. Published 4.9×; measured 6.1× against the same comparator the original used, but 3.3× against a stricter reification form that also joins the base edge. Both return the same 18,317 rows. The published comparator never touches the base edge, so 4.9× was flattered by the other arm doing less work. 3.3×–6.1×, labelled by what each comparator asks, is the honest form — a reviewer who reaches for the stricter one and gets 3.3× against a filed 4.9× would reasonably conclude this issue overstates.

    There is a general lesson in that which I had not appreciated and had been relying on all day: answer-matching equalises what a query returns, not how much work it did to return it. The stricter form is answer-matched and nearly twice as slow. A pair can pass answer-matching and still not be a fair comparison.

    And one claim of mine needs its scope drawn tighter. I said annotations come within 1.4–1.7× on aggregates once the right lane runs. That holds for the body-local confidence filter — measured 1.52×. It is not true for an aggregate that joins the annotation body out to another node, where the gap is 13–23× and no lane closes it.

    Worth stating plainly before the list of corrections above is read as a retreat: nothing here was found to be absent. Every correction is a figure that reproduced at a different magnitude, or a comparison that turned out not to be one. The effects this issue describes are all real; what moved was their size and, in two cases, what they were being compared against.

    Everything else reproduced. All eleven distinct fuel values came back bit-identical on entirely different hardware, the 4.3× lane gap measured 4.39×, and the pushdown win measured −18.4% against a published −16%. Absolutes run about 1.5–1.6× higher on the bench box (slower single core), so ratios are the comparable quantity — anyone re-measuring elsewhere should expect the absolutes to move and the ratios not to.

    When the mis-pick is reachable

    Separately, and this narrows the scope as filed: the 4.3× needs a drained overlay, and one unrelated triple takes it away.

    chain_lane (fluree-db-query/src/default_graph_source.rs:571) returns its answer before anything else, but the arena and enumeration lanes only execute if all five conditions of annotation_probe_gates_pass (:702) hold — sealed arena, content store, not a history query, drained overlay, and root-or-absent policy. Measured on the 60k ledger: freshly indexed, then one unrelated triple committed with no reindex. Lane names from the annotation delegate lane tracing event, not inferred.

    overlay auto arena enumerate chain
    drained arena 321.03 arena 321.03 enumerate 61 generic 662.208
    one flake generic 1273.688 generic 1273.688 generic 1273.688 generic 1273.688

    Gates event reads arena=true store=true history=false overlay_empty=false root_policy=true — the arena is still sealed, it is purely the overlay condition. The intersection is the real scope, and note the fifth conjunct: this is unreachable for any policy-enforced read.

    The cheap fix, and what it is worth

    Given that gate, choose_chain_lane picks arena in states where the runtime will unconditionally refuse it, so the model can be wrong for free. Correcting that is local and needs no calibration corpus.

    It recovers no performance by itself, and I would rather say so than have someone take it expecting a speedup: when the gate demotes you, you still land on generic. It makes the plan honest and --explain truthful. Worth doing, worth less than it sounds — and per the section above, it must not be extended into a general chain-preference without measuring the body-join aggregate.

    A caution for whoever re-fits the constants. where_plan.rs:3338 has MEMBERSHIP_JOIN_MIN_DRIVING: usize = 256, documented as "Mirrors HASH_ANNOTATION_MIN_DRIVING_ROWS in crate::default_graph_source, including its treatment of an unknown estimate as large." Two constants at the same value, one documented as tracking the other, nothing mechanically linking them. That may be a deliberate coupling of two distinct knobs rather than one rule duplicated, so I am not calling it a defect — but an issue that asks someone to re-tune annotation-lane thresholds is exactly where a mirrored value in another module gets changed on one side only, and a doc comment is not a mechanism.

    What is still open

    Whether this matters in production or only just after an index is unresolved, and the numbers above do not settle it.

    The tempting reading — that the overlay gate accidentally rescues users into the faster lane, so the defect only bites in a narrow window — is not what the data shows. Nothing is rescued into chain; everything lands on generic, a third state. But whether generic-under-novelty beats arena-when-drained in time I cannot tell you from 1273.688 against 321.03, because that is a lane comparison and fuel ranks lanes in the opposite order from the clock — on this very code fuel makes enumerate cheapest while the clock makes chain cheapest. The missing input is wall-clock on both overlay states, and a bench box is taking it.

    The other half is workload-shaped: a write-heavy ledger sits demoted most of the time, a read-mostly ledger between write bursts sits drained for long stretches — which is where the mis-pick would bite hardest. "The window is narrow" and "the window is where it matters" can both be true.

    For anyone re-running any of this: the forced-lane pin is honoured at selection and silently ignored at execution when the gates fail, so verify the lane actually fired. The annotation delegate gates and annotation delegate lane events need RUST_LOG=debug and the CLI's -v — RUST_LOG alone emits nothing. --explain's lane-preference will not tell you: it is computed before the gates, and with the environment variable set it echoes your own input back.

    Last thing, since this thread has cast a good deal of doubt on the original figures: after all of the above the fixture was rebuilt and the baseline reproduced to the decimal — 321.03 / 61 / 662.208. With the bench box's bit-identical fuel that is three independent reproductions of the numbers this issue was filed on.

  3. aaj3f commented on Sep 17, 2026

    @aaj3f
    ContributorAuthor

    An independent re-measurement on quiet hardware has landed, and it corrects this issue in two ways — one of which reaches the title. Before the detail, the distinction that matters most:

    The numbers are right. The mechanism is misnamed. Nothing measured here is wrong — arena really is about 3× the alternative, the alternative really is much faster, and the planner really does pick the slow one. What is wrong is calling the fast path "the chain lane", because on these shapes the chain lane does not run at all.

    The number moves as well, so I will take that first.

    The 4.3× lane gap should read 3.07×. Both figures are cold-CLI, which is the part that makes them comparable at all, so it is worth giving both provenances rather than quietly swapping one for the other. Mine came from a lanes.sh run — fresh process per query, a differently-shaped control arm subtracted, on a contended box. The new one is the same instrument done properly: quiet box, floor arm interleaved rather than assumed, warmup discarded per query shape, and two separated runs of 60 repetitions agreeing to 0.5% (3.082× and 3.067×). It supersedes mine on that instrument.

    floor (process start + ledger open) = 9.95 ms, interleaved, both runs
    
    arm            fired lane   Run A     Run B      (above-floor)
    annot_auto     arena        22.19 ms  25.81 ms
    annot_arena    arena        24.03 ms  24.80 ms
    annot_chain    generic       7.20 ms   8.41 ms
    annot_enum     generic       8.00 ms   8.96 ms
    r11_strict     —             9.96 ms  10.29 ms
    r11_loose      —             8.98 ms   9.65 ms
    

    Why "the chain lane" is the wrong name — including in this issue's title

    Forced lanes on m2_annot_2hop.rq, a bound-subject 2-hop, reading annotation delegate lane off the tracing event:

    pin          fired lane            fuel      rows
    unset        arena                 1.154     9
    arena        arena                 1.154     9
    enumerate    generic (elided=true) 1.088     9
    chain        generic (elided=true) 1.088     9
    

    chain and enumerate return identical fuel — two pins collapsing onto one path, which is precisely the value-match signature that catches this. All five gates pass on every arm (arena=true store=true history=false overlay_empty=true), so this is not a demotion. The chain lane is simply not reachable on a bound-subject 2-hop, and neither is enumerate. Both instruments agree — the cold-CLI run above shows the same thing, so it is not an artefact of a fresh process.

    So the honest statement is: the lane the planner picks costs ~3.07× the generic path that runs when the annotation lanes decline. Same direction, same magnitude, different mechanism.

    Two things about that 3.07× before anyone leans on it.

    The arm matters, so I should name it. The numerator is annot_auto — what the planner actually selects — which is the right arm for a user-facing claim, because that is the claim this issue makes. The pinned-arena cell gives 3.34× and 2.95× instead; those sit within the instrument's own 10–15% floor of the auto cell, so they are not a contradiction, but the choice moves the number and should not be left implicit.

    And the magnitude is open, in a known direction. The session that produced it identified a weakness in its own floor: the floor arm was SELECT ?x WHERE { BIND(1 AS ?x) }, which pays process start but never opens the ledger's index pages or warms the dictionary. Whatever cold-ledger cost that leaves unsubtracted lands proportionally harder on the small arm, inflating the denominator and therefore compressing the ratio. The follow-up that would have settled it — a one-point-lookup floor — did not complete before that box expired.

    So the direction is solid and the magnitude is not settled: two separated runs agreeing to 0.5%, an order of magnitude above the noise floor, is strong evidence the gap is real and roughly this size, and the bias — if it bites — makes the true ratio larger, not smaller. I would rather say that than replace a filed 4.3× with a 3.07× presented as clean, which would be trading one overstated number for another in the opposite direction.

    This invalidates the remedy this issue proposes, and it is the third time. #1878 asks for the cost model to be taught to prefer chain. On these shapes chain cannot run, so that change would instruct the planner to choose a lane that is not reachable. That follows the body-join aggregate, where chain is worse than the arena it would replace, and an earlier retraction of the same proposal. The remedy section needs rewriting rather than footnoting: the question is not "which lane should the cost model prefer" but "why does a bound-subject 2-hop decline every annotation lane, and is the generic path it falls to the one we want".

    And the title should change. It currently reads "…is 4.3× slower than the chain lane its cost model rejects", which names a lane that never ran. I have not renamed it — something like "The annotation arena lane is ~3× slower than the generic path that runs when the annotation lanes decline" would be accurate, but it is worth someone else's eyes before it moves.

    How this got mislabelled is worth a sentence, because it argues for the recording discipline rather than against it. The identity table recorded annot_chain fired=generic, per cell, off the tracing event, exactly as the method required. The fact was captured correctly. It was the ratio line one layer up that called that cell "chain". So the right fact sat in the raw output while the derived number carried the wrong name — which is the lane-preference problem in miniature: a label matching the concept someone had in mind, sitting one layer above the value that contradicts it.

    That is also the only reason it was recoverable. Re-deriving the ratios from the per-arm figures is what surfaced it, and that only worked because the fired lane was in the table to check against. A method that had not recorded it per cell would have produced the same wrong label with nothing to catch it on. The discipline did not prevent the error; it made the error findable, which is the more realistic thing to ask of a method.

    ⚠️ Corrected after posting — this paragraph was wrong as first written, and wrong in exactly the way the rest of this comment warns about. It read that the fall-through "is specific to the bound-subject traversal," inferring from three distinct fuel values on the unanchored aggregate (321.03 / 61 / 662.208) that all three pins had been honoured there. Distinct values certify three distinct paths; they do not certify which lanes ran. Reading the fired lane per cell instead:

    pin fired lane fuel
    arena arena 321.03
    enumerate enumerate 61
    chain generic 662.208

    Two of the three are correctly labelled, and chain is misnamed on the aggregate too. The real scope limit is the opposite of what I wrote: chain's fall-through is universal, not shape-specific. Verified in source — the only two execution branches keyed on the chosen lane are lane == ChainLane::Arena (fluree-db-query/src/default_graph_source.rs:393) and lane == ChainLane::Enumerate (:444). There is no lane == ChainLane::Chain branch anywhere in the file; every other occurrence is a choose_chain_lane return value, the env-var parse, the plan_details label, or a unit test. ChainLane::Chain means only "neither of the other two", after which control reaches the hash sidecar (≥256 driving rows) or falls to generic. FLUREE_ANNOTATION_LANE=chain is a pin to nothing, on every shape.

    What is shape-specific is enumerate's eligibility, and it has two conditions rather than one. enumeration_plan returns None if either endpoint is a constant — and also if the child operator's schema already binds the subject, object, annotation, or predicate variable. So "unanchored" has to mean not written as a constant and not bound from upstream: ?x ex:name "Alice" . ?x ex:knows ?y {| … |} has two variable endpoints and is still ineligible. That is why enumerate fires on the unanchored aggregate and is declined on the bound-subject 2-hop.

    One consequence for the aggregate table in my earlier comment, determinable without re-measuring: its 3,826 ms chain cell is the generic path, by the same structural argument. That sentence should read the generic path is worse than the arena lane there. The comparison stands and the constraint it supports gets stronger: the same generic path is ~3× faster than arena on the 2-hop (cold-CLI) and slower than arena on the aggregate (bench box, single-sourced) — which is a cleaner demonstration than the original that no single lane preference is right for both shapes. The enumerate cell at 285 ms on that instrument remains genuinely unverified, as the section below says; enumerate is now known to be structurally eligible on that shape, which makes the label plausible rather than merely unchecked.

    What the instrument can and cannot resolve

    This is the part that makes the rest legible, and it is the reason I trust 3.07× and not everything else in that table.

    annot_auto and annot_arena are the same execution path — both fired arena, both traced — so the distance between them is pure instrument noise. They sit 8.3% apart in Run A and 4.1% in Run B, and annot_auto moves 16% between runs. That gives a stated resolution floor of 10–15%, below which the instrument declines to claim an effect. Using two arms that must be identical as a noise gauge is a much better answer than asserting a confidence interval, and it is what lets the rest be graded honestly:

    • arena/chain at 3.07× — solid. 0.5% run-to-run, far above the floor.
    • annot(chain)/strict at 0.72–0.82× — real in direction, but a 13% spread puts it at the edge of resolution. Cold-CLI, and deliberately not what I mean when I have said "parity" elsewhere; that is a warm-server measurement against a ~0.9 ms floor rather than this 9.95 ms one, and a fresh process pays cold caches on both arms in a way that compresses lane ratios. I am not restating it here and the two should not be put side by side.
    • loose/strict at 6–10% — not resolvable by this instrument. Below the floor, so explicitly unclaimed rather than reported as a small effect.

    Answer-matched throughout: all seven arms return 9 rows with identical content hash bdac65575b46cce9 — annotation on every lane, strict reification, loose reification.

    One provenance caveat that limits what travels. The annotation corpus is byte-identical to mine (69b580e0…), but the reification corpus was reconstructed: every structural invariant matches — 140,023 lines, 20 documents, 20,000 persons, 60,000 ex:source, 60,000 base edges, zero ex:likes, zero ex:title — and the hash does not (87cbe1bb… against 4e62b8b0…). So reification absolutes are not comparable across the two boxes, while ratios computed within either corpus are. That is why the reification comparisons above are given as ratios and not as milliseconds.

    Also worth knowing the measurement used the CLI harness rather than a long-lived server — /query/*ledger returned 404 on that session's server run instances and it declined to spend time on endpoint archaeology, which I think was the right call. The CLI pins correctly, fresh process per query, and it supplied something better than verifying the environment per socket: the fired lane per cell, read off the tracing event. Which is how the generic finding above surfaced at all.

    A limitation on the aggregate result I posted earlier, which the same label problem puts a name to

    The per-lane aggregate figures in my earlier comment — arena 3,289 ms, chain 3,826 ms, enumerate 285 ms, reification 21.5 ms, named graph 12.4 ms — and the constraint I drew from them are single-sourced. One machine, one session, not independently reproduced, and that box self-destructed on its TTL — so this is permanent rather than pending. Its last successful cells were the two 60-repetition 2-hop runs; the aggregate arms were never re-run. The traversal and parity cells were measured on two boxes; the aggregate cells were not, and I would rather say so than let them sit at the same apparent weight.

    The doubt is specific rather than generic, and it is the same defect as the label above. I have just had to correct "arena / chain" because the chain arm fired generic. The 285 ms enumerate cell has exactly that exposure and nobody checked it: it is a different shape — an unanchored aggregate, where enumerate should be genuinely reachable rather than declined — but the fired lane on that specific cell was never verified. If it turns out to be a generic cell wearing an enumerate label, then "the best lane is a third one" collapses and the constraint changes shape.

    So: whoever acts on this should re-measure the aggregate with the fired lane asserted per cell before relying on the constraint. That is a cheap check with a named instrument — the same tracing event that surfaced the traversal mislabel — not an open-ended ask.

    I am flagging this as a limitation the issue carries, not as a reason to discount the constraint. It is still the best evidence available, and it is the thing standing between us and shipping a chain-preference that regresses a realistic attributed-claims aggregate. But a reader deciding how much weight to put on it deserves to know it rests on one box.

    And a hazard for anyone reproducing this

    FLUREE_ANNOTATION_LANE can degrade silently — the pinned lane is returned verbatim while whether it can run is decided downstream, so a failed gate falls through with no warning and entirely plausible timings. Filed separately as #1880. The tell is the pinned lanes agreeing, which reads as stability rather than breakage; the instrument to trust is fuel, which is bit-identical across runs, not the plan.

    Not affected here — the gate flags above are explicit on every cell, which is exactly the check #1880 argues should be routine.

  4. changed the title [-]The annotation arena lane is 4.3× slower than the chain lane its cost model rejects, and ignores object bounds on the body lookup it builds[/-] [+]The annotation arena lane is ~3× slower than the generic path that runs when the annotation lanes decline, and ignores object bounds on the body lookup it builds[/+] on Sep 17, 2026
  5. changed the title [-]The annotation arena lane is ~3× slower than the generic path that runs when the annotation lanes decline, and ignores object bounds on the body lookup it builds[/-] [+]Annotation lane selection is wrong in both arms: a categorical guard decides for bound subjects, and the cost model picks the slower lane on every case we can grade[/+] on Sep 18, 2026
  6. bplatz commented on Nov 20, 2026

    @bplatz
    Contributor

    Fixed on next by #2017 (merged 2026-10-06, a25d446), which removes the annotation arena and its lanes: choose_chain_lane and FLUREE_ANNOTATION_LANE no longer exist there. Ships in 5.0; main (4.2.x) keeps the old code. The PR's Fixes keyword didn't close this because its base was next.

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

    P2area:querybugperformance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions