Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/nornir

.nornir/assets/scip-ours-vs-theirs.svg

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1180 800" font-family="'DejaVu Sans', 'Segoe UI', sans-serif">
  <defs>
    <linearGradient id="board" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0" stop-color="#0b1c2e"/>
      <stop offset="1" stop-color="#06111d"/>
    </linearGradient>
    <linearGradient id="chip" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0" stop-color="#14384f"/>
      <stop offset="1" stop-color="#0e2a3e"/>
    </linearGradient>
    <linearGradient id="rail" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0" stop-color="#173d57"/>
      <stop offset="1" stop-color="#0c2438"/>
    </linearGradient>
    <linearGradient id="ours" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0" stop-color="#123a4f"/>
      <stop offset="1" stop-color="#0a2433"/>
    </linearGradient>
    <linearGradient id="ext" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0" stop-color="#3a3320"/>
      <stop offset="1" stop-color="#241f12"/>
    </linearGradient>
    <marker id="arrow" markerWidth="9" markerHeight="9" refX="7" refY="3" orient="auto" markerUnits="userSpaceOnUse">
      <path d="M0 0 L7 3 L0 6 Z" fill="#6fd3f5"/>
    </marker>
    <marker id="arrowA" markerWidth="9" markerHeight="9" refX="7" refY="3" orient="auto" markerUnits="userSpaceOnUse">
      <path d="M0 0 L7 3 L0 6 Z" fill="#ff7a7a"/>
    </marker>
  </defs>

  <rect x="0" y="0" width="1180" height="800" fill="url(#board)"/>
  <g stroke="#143a52" stroke-width="1">
    <line x1="0" y1="84" x2="1180" y2="84"/>
    <line x1="0" y1="768" x2="1180" y2="768"/>
  </g>

  <!-- title -->
  <text x="40" y="42" fill="#eaf6ff" font-size="22" font-weight="700">RESOLVED index &#8212; ours vs <tspan font-family="'DejaVu Sans Mono', monospace">rust-analyzer scip</tspan></text>
  <text x="40" y="64" fill="#9fc9e0" font-size="14">same engine (rust-analyzer on <tspan fill="#bfe6ff" font-weight="700">salsa</tspan>), two delivery paths &#8212; the difference is <tspan fill="#bfe6ff" font-weight="700">how it runs</tspan> + <tspan fill="#bfe6ff" font-weight="700">what it keeps</tspan></text>

  <!-- legend: line kinds + OWNERSHIP -->
  <g font-size="11.5">
    <line x1="582" y1="34" x2="612" y2="34" stroke="#6fd3f5" stroke-width="3" marker-end="url(#arrow)"/>
    <text x="618" y="38" fill="#cfe6f5">data flow</text>
    <line x1="690" y1="34" x2="720" y2="34" stroke="#ff7a7a" stroke-width="2.5" stroke-dasharray="5 4"/>
    <text x="726" y="38" fill="#cfe6f5">stubbed</text>
    <rect x="800" y="27" width="14" height="14" rx="3" fill="url(#ours)" stroke="#7CFFB2" stroke-width="2"/>
    <text x="820" y="38" fill="#cfe6f5">OURS (nornir)</text>
    <rect x="936" y="27" width="14" height="14" rx="3" fill="url(#ext)" stroke="#ffcf6f" stroke-width="2"/>
    <text x="956" y="38" fill="#cfe6f5">EXTERNAL (rust-lang)</text>
  </g>

  <!-- ===================== shared SOURCE (left) ===================== -->
  <rect x="36" y="338" width="140" height="96" rx="10" fill="url(#rail)" stroke="#7fc8ea" stroke-width="2"/>
  <text x="106" y="372" fill="#eaf6ff" font-size="14" font-weight="700" text-anchor="middle">source</text>
  <text x="106" y="392" fill="#9fc9e0" font-size="10" text-anchor="middle">a cargo crate</text>
  <text x="106" y="410" fill="#86b3cc" font-size="9.5" text-anchor="middle">Cargo.toml + .rs</text>
  <text x="106" y="424" fill="#7fa8c4" font-size="9" font-family="'DejaVu Sans Mono', monospace" text-anchor="middle">same input</text>

  <!-- shared ENGINE chip (external) -->
  <rect x="36" y="470" width="140" height="118" rx="10" fill="url(#ext)" stroke="#ffcf6f" stroke-width="2"/>
  <text x="106" y="494" fill="#ffe1a3" font-size="12.5" font-weight="700" text-anchor="middle">rust-analyzer</text>
  <text x="106" y="510" fill="#d9c79a" font-size="9.5" text-anchor="middle">ra_ap_* libs / CLI</text>
  <text x="106" y="530" fill="#ffe1a3" font-size="11.5" font-weight="700" text-anchor="middle">salsa DB</text>
  <text x="106" y="545" fill="#d9c79a" font-size="9" text-anchor="middle">incremental, memoized</text>
  <text x="106" y="565" fill="#d9c79a" font-size="9" text-anchor="middle">find_all_refs</text>
  <text x="106" y="578" fill="#d9c79a" font-size="9" text-anchor="middle">goto_definition</text>
  <text x="106" y="455" fill="#ffcf6f" font-size="9.5" text-anchor="middle">THE ENGINE (both lanes)</text>

  <!-- ===================== THEIRS lane (top) ===================== -->
  <text x="224" y="120" fill="#ffcf6f" font-size="14" font-weight="700">THEIRS &#183; external CLI &#183; subprocess</text>
  <line x1="176" y1="360" x2="232" y2="190" stroke="#7fb0cc" stroke-width="2.2" fill="none"/>

  <rect x="232" y="136" width="240" height="104" rx="10" fill="url(#ext)" stroke="#ffcf6f" stroke-width="2"/>
  <text x="352" y="160" fill="#ffe1a3" font-size="13.5" font-weight="700" text-anchor="middle">rust-analyzer scip .</text>
  <text x="352" y="178" fill="#d9c79a" font-size="10" text-anchor="middle">one process, batch, full closure</text>
  <text x="352" y="196" fill="#d9c79a" font-size="10" text-anchor="middle">emits EVERY occurrence token</text>
  <text x="352" y="214" fill="#ffcf6f" font-size="10" text-anchor="middle">incl. ~99 local-var (local N) tokens</text>
  <text x="352" y="230" fill="#ff9d9d" font-size="9.5" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">1.4s &#183; 508MB &#183; 268 occ (64d/204r)</text>

  <line x1="472" y1="188" x2="520" y2="188" stroke="#6fd3f5" stroke-width="3" marker-end="url(#arrow)"/>

  <rect x="524" y="146" width="170" height="84" rx="10" fill="url(#rail)" stroke="#5aa6cf" stroke-width="2"/>
  <text x="609" y="172" fill="#eaf6ff" font-size="13" font-weight="700" text-anchor="middle">index.scip</text>
  <text x="609" y="190" fill="#9fc9e0" font-size="9.5" text-anchor="middle">portable protobuf file</text>
  <text x="609" y="206" fill="#86b3cc" font-size="9" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">Document[] &#183; Occurrence[]</text>
  <text x="609" y="220" fill="#86b3cc" font-size="9" text-anchor="middle">global RESOLVED monikers</text>

  <line x1="694" y1="188" x2="742" y2="188" stroke="#6fd3f5" stroke-width="3" marker-end="url(#arrow)"/>

  <rect x="746" y="146" width="186" height="84" rx="10" fill="url(#ours)" stroke="#7CFFB2" stroke-width="2"/>
  <text x="839" y="170" fill="#eaf6ff" font-size="12.5" font-weight="700" text-anchor="middle">scip.rs (our parser)</text>
  <text x="839" y="187" fill="#9fc9e0" font-size="9.5" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">--features scip</text>
  <text x="839" y="204" fill="#86b3cc" font-size="9" text-anchor="middle">protobuf_parse &#8594; ScipRow</text>
  <text x="839" y="218" fill="#86b3cc" font-size="9" text-anchor="middle">we already CONSUME their format</text>

  <!-- ===================== OURS lane (bottom) ===================== -->
  <text x="224" y="656" fill="#7CFFB2" font-size="14" font-weight="700">OURS &#183; ra_ap linked IN-PROCESS &#183; no subprocess, no file</text>
  <line x1="176" y1="412" x2="232" y2="560" stroke="#6fd3f5" stroke-width="2.2" fill="none"/>

  <rect x="232" y="540" width="240" height="120" rx="10" fill="url(#ours)" stroke="#7CFFB2" stroke-width="2"/>
  <text x="352" y="563" fill="#eaf6ff" font-size="12.5" font-weight="700" text-anchor="middle">ra_ingest.rs &#183; LOAD phase</text>
  <text x="352" y="580" fill="#9fc9e0" font-size="9.5" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">--features ra-ingest</text>
  <text x="352" y="598" fill="#86b3cc" font-size="9" text-anchor="middle">build salsa RootDatabase in-process</text>
  <text x="352" y="614" fill="#ffcf6f" font-size="9" text-anchor="middle">parallelism = ra's OWN threads</text>
  <text x="352" y="628" fill="#86b3cc" font-size="9" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">num_worker_threads (salsa: serial-ish)</text>
  <text x="352" y="648" fill="#7CFFB2" font-size="9" text-anchor="middle">workspace-only scope</text>

  <line x1="472" y1="600" x2="520" y2="600" stroke="#6fd3f5" stroke-width="3" marker-end="url(#arrow)"/>

  <rect x="524" y="540" width="200" height="120" rx="10" fill="url(#ours)" stroke="#7CFFB2" stroke-width="2.5"/>
  <text x="624" y="562" fill="#eaf6ff" font-size="12.5" font-weight="700" text-anchor="middle">RESOLVE &#183; gatling</text>
  <text x="624" y="578" fill="#7CFFB2" font-size="9.5" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">gatling_map_owned</text>
  <text x="624" y="595" fill="#9fc9e0" font-size="9.5" text-anchor="middle">ALL cores &#183; rayon-free</text>
  <text x="624" y="612" fill="#86b3cc" font-size="9" text-anchor="middle">1 Analysis snapshot / chunk</text>
  <text x="624" y="626" fill="#86b3cc" font-size="9" text-anchor="middle">(salsa is Send + !Sync + !Clone)</text>
  <text x="624" y="646" fill="#86b3cc" font-size="9" text-anchor="middle">&#8594; mint a snapshot, move into worker</text>

  <line x1="724" y1="600" x2="742" y2="600" stroke="#6fd3f5" stroke-width="3" marker-end="url(#arrow)"/>

  <rect x="746" y="540" width="186" height="120" rx="10" fill="url(#ours)" stroke="#7CFFB2" stroke-width="2"/>
  <text x="839" y="563" fill="#eaf6ff" font-size="12.5" font-weight="700" text-anchor="middle">ScipRow stream</text>
  <text x="839" y="580" fill="#9fc9e0" font-size="9.5" text-anchor="middle">same data model as theirs</text>
  <text x="839" y="597" fill="#86b3cc" font-size="9" text-anchor="middle">def key = file#Lline:Ccol</text>
  <text x="839" y="611" fill="#ffcf6f" font-size="9" text-anchor="middle">(real monikers stubbed)</text>
  <text x="839" y="625" fill="#86b3cc" font-size="9" text-anchor="middle">NO local-var tokens (call-graph)</text>
  <text x="839" y="646" fill="#7CFFB2" font-size="9.5" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">0.12s &#183; 55MB &#183; 135 occ (41d/94r)</text>

  <!-- ===================== shared SINK (right) ===================== -->
  <rect x="960" y="338" width="184" height="168" rx="10" fill="#0f2c40" stroke="#7fc8ea" stroke-width="2"/>
  <text x="1052" y="368" fill="#dff1ff" font-size="13.5" font-weight="700" text-anchor="middle">scip_occurrences</text>
  <text x="1052" y="386" fill="#bcd9ec" font-size="10" text-anchor="middle">Iceberg warehouse table</text>
  <text x="1052" y="408" fill="#7CFFB2" font-size="10" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">SHA-keyed &#183; time-travel</text>
  <text x="1052" y="424" fill="#86b3cc" font-size="9" text-anchor="middle">(r-a is NEVER historized)</text>
  <text x="1052" y="446" fill="#bcd9ec" font-size="10" text-anchor="middle">query::load_preferred</text>
  <text x="1052" y="462" fill="#86b3cc" font-size="9" text-anchor="middle">CLI &#183; MCP &#183; server &#183; metro</text>
  <text x="1052" y="478" fill="#86b3cc" font-size="9" text-anchor="middle">scip-when-populated, else syn</text>
  <text x="1052" y="496" fill="#7CFFB2" font-size="9" text-anchor="middle">OURS: store + query layer</text>

  <!-- THEIRS -> sink ; OURS -> sink -->
  <path d="M932 188 H946 V404 H960" stroke="#6fd3f5" stroke-width="3" fill="none" marker-end="url(#arrow)"/>
  <path d="M932 600 H946 V452 H960" stroke="#6fd3f5" stroke-width="3" fill="none" marker-end="url(#arrow)"/>

  <!-- ===================== center verdict band ===================== -->
  <rect x="232" y="262" width="700" height="76" rx="10" fill="url(#rail)" stroke="#7fb0cc" stroke-width="1.6"/>
  <text x="252" y="286" fill="#bfe6ff" font-size="13" font-weight="700">can we output the SAME?</text>
  <text x="252" y="306" fill="#cfe6f5" font-size="11"><tspan fill="#7CFFB2" font-weight="700">SAME engine</tspan> (pinned both to the 0.0.337 / 2026-06-15 cut) &#8594; counts identical across versions &#8658; <tspan fill="#bfe6ff" font-weight="700">version drift = 0</tspan></text>
  <text x="252" y="324" fill="#cfe6f5" font-size="11">the 135-vs-268 gap is <tspan fill="#7CFFB2" font-weight="700">100% by-design</tspan> (we drop local-var tokens + workspace-scope). <tspan fill="#ff7a7a" font-weight="700">Byte-identical index.scip = NOT YET</tspan> (emit + monikers stubbed)</text>
  <path d="M640 540 C 614 460, 614 300, 614 232" stroke="#ff7a7a" stroke-width="2.2" fill="none" stroke-dasharray="5 4" marker-end="url(#arrowA)"/>
  <text x="624" y="410" fill="#ff7a7a" font-size="9.5">emit (TODO)</text>

  <!-- ===================== bench strip ===================== -->
  <rect x="36" y="700" width="1108" height="46" rx="9" fill="#0c2233" stroke="#2b6f96" stroke-width="1.2"/>
  <text x="52" y="720" fill="#bfe6ff" font-size="11.5" font-weight="700">BENCH (128-LOC zero-dep crate):</text>
  <text x="270" y="720" fill="#7CFFB2" font-size="11" font-family="'DejaVu Sans Mono', monospace">OURS 0.12s / 55MB / 135 occ</text>
  <text x="560" y="720" fill="#ffcf6f" font-size="11" font-family="'DejaVu Sans Mono', monospace">THEIRS 1.4s / 508MB / 268 occ</text>
  <text x="860" y="720" fill="#eaf6ff" font-size="11">&#8776; <tspan fill="#7CFFB2" font-weight="700">11&#215; faster, 9&#215; leaner</tspan></text>
  <text x="52" y="738" fill="#86b3cc" font-size="9.5">scope differs by intent: ours feeds a call graph (no locals); the engine + cut are identical, so the difference is approach, not version.</text>

  <!-- footer -->
  <text x="40" y="762" fill="#5e86a0" font-size="10.5" font-family="'DejaVu Sans Mono', monospace">src/knowledge/{ra_ingest.rs, scip.rs, query.rs} &#183; both off by default &#183; OURS = run in-process + parallel (gatling) + historize + serve &#183; next: INCREMENTAL + moniker emit</text>
</svg>