Skip to content
quarry Artifact [a2031eb0a3]
Login

Artifact [a2031eb0a3]

Artifact a2031eb0a377dbbe393ed26180c8a620a2b3e11c70ef8adf85d3a6f26a2ec38a:

Ticket change [a2031eb0a3] - New ticket [5064369266] HTTP compression for pages and API, with SSE excluded. by ai-local on 2026-08-31 11:53:49.
D 2026-08-31T11:53:49.817
J cmimetype text/x-markdown
J comment Nothing\sis\scompressed\stoday.\sConfirmed\sagainst\sthe\slive\sforge:\sidentical\sbyte\scounts\swith\sand\swithout\sAccept-Encoding:\sgzip,\sand\sno\sContent-Encoding\son\sany\sresponse.\sThe\sonly\scompression\sin\sthe\stree\sis\sxfer/container.go\s(zlib,\sper\sthe\ssync\sRFC)\sand\sa\sgzip\sreader\sin\sregistrar.go.\n\nMeasured\ssavings:\stimeline\s309,584\sto\s36,599\s(88%);\sticket\slist\s209,058\sto\s33,194\s(84%);\sAPI\stimeline\s30,190\sto\s7,090\s(77%);\ssrc/btree.c\spage\s2,335,223\sto\s196,463\s(92%).\n\nBenchmarked\son\sthe\s310KB\stimeline\spage:\sgzip-1\s50,688/1.1ms;\sgzip-6\s37,166/3.3ms;\sgzip-9\s36,593/5.1ms;\sbrotli-4\s37,725/2.0ms;\sbrotli-5\s34,551/3.0ms;\sbrotli-6\s33,790/3.5ms;\sbrotli-11\s29,973/247ms.\sBrotli\sq5\sbeats\sgzip-6\son\sBOTH\ssize\s(-7%)\sand\stime,\sso\sthere\sis\sno\stradeoff\sto\sweigh;\sq11\sis\sunusable\sfor\sdynamic\spages\sbut\sright\sfor\sstatic\sassets\scompressed\sonce.\n\nHonest\sscope:\sthe\sforge\sis\sreached\sover\sTailscale\sat\s17.3MB/s,\swhere\sthis\ssaves\sonly\sa\sfew\sms.\sIt\smatters\sfor\sanyone\sremote\s—\sthe\sbtree.c\spage\sis\s3.7s\svs\s0.3s\sat\s5Mbps.\n\nBrotli\sneeds\sandybalholm/brotli\s(no\sstdlib\ssupport);\sgzip-only\sis\sa\sdefensible\sdependency-free\sanswer\sat\s88%\sof\sthe\sbenefit.\n\nTRAP:\sweb.go\shas\s22\stext/event-stream\swriters.\sA\snaive\smiddleware\sbuffers\sand\sbreaks\sDatastar\sstreaming.\sExcluding\sSSE\smust\sbe\sin\sthe\sfirst\scommit,\swith\sa\stest\sasserting\san\sSSE\sresponse\scarries\sno\sContent-Encoding\sand\sstill\sflushes\sper\sevent.\n\nAcceptance:\sHTML\sand\sJSON\sresponses\snegotiate\sencoding;\sSSE\snever\scompressed\sand\sstill\sstreams;\sa\stest\spins\sboth.
J priority Medium
J severity Important
J status Open
J subsystem web
J title HTTP\scompression\sfor\spages\sand\sAPI,\swith\sSSE\sexcluded
J type Feature
K 50643692665bb464e85d10966b056b2b894674c0
U ai-local
Z bcbbbce037784939aea63880ef6147c1