Skip to content
quarry Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 374c34d1d08a7523b34a85f064e79dc59bc72680660a169deacf5d322d73fb34
Ticket: 6dbaeb218dcf545420cc76c79f61221f1ed72085
Streaming binary through the op registry: archives are copied three times
User & Date: dmestas on 2026-08-18 14:41:30
Changes

  1. comment changed to:
    An archive request today reads the built file into memory, base64-encodes it into a JSON op result, and the web route decodes it back — three full copies of a 13MB payload plus a 17MB string, per request. The disk cache removed the rebuild cost (10.4s cold, 0.7s warm for sqlite trunk) but that residual 0.7s is entirely the copying.
    
    The tension is 0001 §9: one registry serves HTML and JSON, so the web route cannot bypass the op. But ops return JSON values and an archive is bytes, which JSON has no type for.
    
    Worth deciding: whether the registry grows a notion of a streaming/binary result (an op that yields an io.Reader plus content type, with the JSON surface returning a download URL rather than the bytes), or whether binary downloads are declared outside the op seam with their own rule. The former keeps §9 intact; the latter is smaller but carves an exception.
    
    Also here: a 304 revalidation still runs the whole op before the ETag is compared, because the ETag contains the resolved check-in and resolution lives in the op. Cheap to fix once a resolution is available without building the archive.
    
  2. severity changed to: "Minor"
  3. status changed to: "Open"
  4. title changed to:
    Streaming binary through the op registry: archives are copied three times
    
  5. type changed to: "Code_Defect"