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

nordisk/znippy-zoomies

.nornir/assets/scanners_flow.svg

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1180 660" 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="slot" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#123448"/><stop offset="1" stop-color="#0a2032"/></linearGradient>
    <marker id="ah" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0 0 L10 5 L0 10 z" fill="#6fd3f5"/></marker>
  </defs>

  <rect x="0" y="0" width="1180" height="660" fill="url(#board)"/>
  <g stroke="#143a52" stroke-width="1"><line x1="0" y1="74" x2="1180" y2="74"/><line x1="0" y1="616" x2="1180" y2="616"/></g>
  <g fill="#16415c"><circle cx="40" cy="38" r="2"/><circle cx="1140" cy="38" r="2"/></g>

  <text x="40" y="42" fill="#eaf6ff" font-size="22" font-weight="700">scanners</text>
  <text x="200" y="42" fill="#9fc9e0" font-size="15">json / xml / vtd — boundary-aligned OVERSPLIT (8× cores) → self-dispatch parse → in-order merge to a zero-copy span index</text>

  <g font-size="12"><line x1="820" y1="60" x2="860" y2="60" stroke="#6fd3f5" stroke-width="3" marker-end="url(#ah)"/><text x="866" y="64" fill="#cfe6f5">parallel dataflow</text></g>

  <!-- INPUT -->
  <rect x="34" y="250" width="140" height="150" rx="10" fill="url(#chip)" stroke="#5aa6cf" stroke-width="2"/>
  <text x="104" y="276" fill="#eaf6ff" font-size="14" font-weight="700" text-anchor="middle">input bytes</text>
  <rect x="50" y="300" width="108" height="26" rx="5" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1.4"/>
  <text x="104" y="317" fill="#bfe6ff" font-size="8.6" text-anchor="middle" font-family="'DejaVu Sans Mono',monospace">NDJSON / XML / OSM</text>
  <rect x="50" y="332" width="108" height="26" rx="5" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1.4"/>
  <text x="104" y="349" fill="#bfe6ff" font-size="8.6" text-anchor="middle" font-family="'DejaVu Sans Mono',monospace">&amp;[u8] (borrowed)</text>
  <text x="104" y="378" fill="#7fa8c4" font-size="9" text-anchor="middle">src/{json,xml,vtd}.rs</text>

  <!-- SPLIT -->
  <rect x="212" y="200" width="212" height="248" rx="12" fill="url(#rail)" stroke="#7fc8ea" stroke-width="2.5"/>
  <text x="318" y="224" fill="#eaf6ff" font-size="14" font-weight="700" text-anchor="middle">boundary-aligned split</text>
  <text x="318" y="241" fill="#9fc9e0" font-size="10" text-anchor="middle">OVERSPLIT: units = n × 8</text>
  <rect x="230" y="254" width="176" height="34" rx="5" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1.4"/>
  <text x="318" y="268" fill="#bfe6ff" font-size="8.8" text-anchor="middle" font-family="'DejaVu Sans Mono',monospace">json: memchr(b'\n')</text>
  <text x="318" y="279" fill="#9fc9e0" font-size="8.2" text-anchor="middle">RFC 8259 §7: raw \n = record edge</text>
  <rect x="230" y="294" width="176" height="34" rx="5" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1.4"/>
  <text x="318" y="308" fill="#bfe6ff" font-size="8.8" text-anchor="middle" font-family="'DejaVu Sans Mono',monospace">xml/vtd: find_top_level_start</text>
  <text x="318" y="319" fill="#9fc9e0" font-size="8.2" text-anchor="middle">memchr('&lt;') + tag-name match</text>
  <text x="318" y="342" fill="#7CFFB2" font-size="9" text-anchor="middle">candidate i·chunk seeked to next</text>
  <text x="318" y="355" fill="#7CFFB2" font-size="9" text-anchor="middle">boundary → no record straddles a cut</text>
  <text x="318" y="378" fill="#ffcf6f" font-size="9" text-anchor="middle">xml gates parallel behind 4 MiB;</text>
  <text x="318" y="391" fill="#ffcf6f" font-size="9" text-anchor="middle">below ⇒ serial scan_slice</text>
  <text x="318" y="414" fill="#86b3cc" font-size="9" text-anchor="middle">monotonic borders ⇒ empty unit if</text>
  <text x="318" y="427" fill="#86b3cc" font-size="9" text-anchor="middle">two land in one record (no overlap)</text>

  <!-- WORKERS -->
  <rect x="462" y="216" width="214" height="216" rx="12" fill="url(#chip)" stroke="#7fc8ea" stroke-width="2.5"/>
  <text x="569" y="240" fill="#eaf6ff" font-size="14.5" font-weight="700" text-anchor="middle">N workers</text>
  <text x="569" y="257" fill="#9fc9e0" font-size="10" text-anchor="middle">gatling_for_each · self-dispatch</text>
  <g font-family="'DejaVu Sans Mono',monospace">
    <rect x="482" y="270" width="174" height="26" rx="5" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1.4"/>
    <text x="569" y="287" fill="#bfe6ff" font-size="9" text-anchor="middle">scan_slice(unit)</text>
    <rect x="482" y="302" width="174" height="26" rx="5" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1.4"/>
    <text x="569" y="319" fill="#bfe6ff" font-size="9" text-anchor="middle">emit RecordSpan/ElemSpan</text>
    <rect x="482" y="334" width="174" height="26" rx="5" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1.4"/>
    <text x="569" y="351" fill="#bfe6ff" font-size="9" text-anchor="middle">xml: map(kind, span)→T</text>
  </g>
  <text x="569" y="382" fill="#86b3cc" font-size="9" text-anchor="middle">dense region can't strand a worker —</text>
  <text x="569" y="395" fill="#86b3cc" font-size="9" text-anchor="middle">8× units let siblings steal the tail</text>
  <text x="569" y="416" fill="#7fa8c4" font-size="9" text-anchor="middle">json.rs:165 · xml.rs:421 · vtd.rs:695</text>

  <!-- MERGE -->
  <rect x="714" y="216" width="196" height="216" rx="12" fill="url(#rail)" stroke="#7fc8ea" stroke-width="2.5"/>
  <text x="812" y="240" fill="#eaf6ff" font-size="14" font-weight="700" text-anchor="middle">in-order merge</text>
  <rect x="732" y="256" width="160" height="30" rx="5" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1.4"/>
  <text x="812" y="270" fill="#bfe6ff" font-size="8.8" text-anchor="middle" font-family="'DejaVu Sans Mono',monospace">Vec&lt;Vec&lt;Span&gt;&gt; in unit order</text>
  <text x="812" y="281" fill="#9fc9e0" font-size="8.2" text-anchor="middle">no sort — order inherent</text>
  <rect x="732" y="294" width="160" height="30" rx="5" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1.4"/>
  <text x="812" y="308" fill="#bfe6ff" font-size="8.8" text-anchor="middle" font-family="'DejaVu Sans Mono',monospace">on_record / on_item(cb)</text>
  <text x="812" y="319" fill="#9fc9e0" font-size="8.2" text-anchor="middle">on calling thread</text>
  <text x="812" y="346" fill="#ffcf6f" font-size="8.8" text-anchor="middle">vtd planet: prefix-sum mmap /</text>
  <text x="812" y="359" fill="#ffcf6f" font-size="8.8" text-anchor="middle">BTreeMap committer / I/O-ring</text>
  <text x="812" y="382" fill="#86b3cc" font-size="9" text-anchor="middle">deterministic: byte-identical to serial</text>
  <text x="812" y="404" fill="#7fa8c4" font-size="9" text-anchor="middle">vtd.rs:347/468/599</text>

  <!-- OUTPUT -->
  <rect x="944" y="250" width="180" height="150" rx="11" fill="url(#chip)" stroke="#7fc8ea" stroke-width="2.5"/>
  <text x="1034" y="276" fill="#eaf6ff" font-size="14" font-weight="700" text-anchor="middle">span index</text>
  <rect x="962" y="296" width="144" height="26" rx="5" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1.4"/>
  <text x="1034" y="313" fill="#bfe6ff" font-size="8.4" text-anchor="middle" font-family="'DejaVu Sans Mono',monospace">byte offsets, zero-copy</text>
  <rect x="962" y="328" width="144" height="26" rx="5" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1.4"/>
  <text x="1034" y="345" fill="#bfe6ff" font-size="8.4" text-anchor="middle" font-family="'DejaVu Sans Mono',monospace">ElemIndex 32B repr(C)</text>
  <text x="1034" y="374" fill="#7fa8c4" font-size="9" text-anchor="middle">sorted by file_offset</text>

  <!-- FLOW -->
  <g stroke="#6fd3f5" stroke-width="3" fill="none">
    <path d="M174 325 H210" marker-end="url(#ah)"/>
    <path d="M424 322 H460" marker-end="url(#ah)"/>
    <path d="M676 322 H712" marker-end="url(#ah)"/>
    <path d="M910 322 H942" marker-end="url(#ah)"/>
  </g>

  <!-- ground rail -->
  <rect x="212" y="560" width="912" height="44" rx="9" fill="url(#rail)" stroke="#7fc8ea" stroke-width="2"/>
  <text x="230" y="580" fill="#dff1ff" font-size="12" font-weight="700">one shape</text>
  <text x="230" y="596" fill="#bcd9ec" font-size="10">all three: split at legal record boundaries · gatling_for_each self-dispatch · merge in unit order · emit zero-copy spans. vtd adds planet-scale mmap/revolver/pipelined committers.</text>
</svg>