Skip to content
quarry Artifact [3d210fc96a]
Login

Artifact [3d210fc96a]

Artifact 3d210fc96a2bffe65bca41df38ec3b6defcf84429382c5423bfd0c238fb7dacf:

Ticket change [3d210fc96a] - New ticket [61417e834b] Evaluated valyala/quicktemplate as an html/template replacement — not adopting. by ai-local on 2026-08-31 11:54:08.
D 2026-08-31T11:54:08.527
J cmimetype text/x-markdown
J comment Asked\sto\slook\sat\squicktemplate,\swhich\sadvertises\sa\s20x\sspeedup\sover\shtml/template.\sMeasured\sfirst,\sand\sit\sdoes\snot\sapply\sto\squarry.\n\nWHAT\sTHE\sBENCHMARK\sMEASURES:\s120ns/op\svs\shtml/template\s2501ns/op\son\sone\ssimple\stemplate.\sA\sper-execution\smicrobenchmark,\snot\sa\spage.\n\nWHY\sIT\sDOES\sNOT\sHELP\sHERE.\sThe\sdecisive\snumber:\s/api/v1/r/sqlite/file/trunk/src/btree.c\s—\swhich\snever\stouches\shtml/template\s—\stakes\s703ms\sTTFB,\sSLOWER\sthan\sthe\s461ms\sHTML\spage\sfor\sthe\ssame\sfile.\sThe\scost\sis\sblob\sretrieval\sand\shighlighting,\snot\stemplating.\sCorroborating:\sthe\stimeline\spage\semits\s309,584\sbytes\sof\sHTML\sin\s12ms\stotal\sincluding\sops,\sso\stemplate\sexecution\sis\sbounded\swell\sunder\sthat;\sscaled\slinearly,\sthe\s2.3MB\sbtree.c\spage\sis\smaybe\s~90ms\sof\stemplate\sinside\s461ms.\sA\s20x\scut\sthere\sreturns\s~19%\son\sone\spage\stype\sand\snothing\son\sordinary\spages.\sAmdahl.\n\nWHAT\sIT\sWOULD\sCOST.\s(1)\sEscaping:\squicktemplate\sescapes\sexplicitly\sper\stag\s({%s%},\s{%q%},\s{%u%})\s—\sit\sis\sNOT\scontextual.\shtml/template\sknows\swhether\sit\sis\sin\san\sattribute,\sURL,\sJS\sor\sCSS\scontext\sand\sescapes\saccordingly.\squarry\srenders\suntrusted\supstream\scontent\s—\scommit\smessages,\sticket\stitles\sand\sforum\sposts\sfrom\smirrored\sfossil\srepos\s—\sso\scontextual\sauto-escaping\sis\sa\ssecurity\sproperty,\sand\sswapping\sit\sfor\sper-call\sdiscipline\sacross\sa\s20k-line\stemplate\ssurface\strades\sa\sclass\sof\sXSS\sbug\sfor\spercentage\spoints.\s(2)\sA\sqtc\scodegen\sstep\sand\s.qtpl\sfiles,\swhere\stemplates\sare\scurrently\sGo\sconstants\scompiled\sinto\sthe\sbinary.\s(3)\sA\sdependency,\sagainst\sthe\ssmol\scontract.\n\nDECISION:\sno.\sThe\smeasured\sbottlenecks\sare\shighlighting\sand\sblob\sretrieval\s—\ssee\sthe\shighlight\scache\sand\sfile-windowing\stickets.\sRevisit\sonly\sif\sa\sprofile\sever\sshows\stemplate\sexecution\sdominating,\swhich\stoday\sit\sdoes\snot.
J priority Low
J severity Minor
J status Closed
J subsystem web
J title Evaluated\svalyala/quicktemplate\sas\san\shtml/template\sreplacement\s—\snot\sadopting
J type Feature
K 61417e834bebf399d0d2f0a7961da35bcf7563da
U ai-local
Z d08986283dd30e62075831a62cdc7b4a