Files
magpie/internal/catalog
yetone 1eebd1ff3c providers: a known maker price is answered without garbage too
b53f4e7c4 built the price memo's key in a 160-byte stack buffer. A
maker price names every maker catalog, which is longer, so on the
real account every maker-price hit still grew the key on the heap:
pricedOnce was 25.5MB of 186.9MB allocated over 40 asks of
/api/providers. The buffer is now 1 KB.

Measured on mote with the real account copy (aalloc.sh, 40 asks,
alloc_space delta): 186.9MB (t13, v0.1.3446) -> 169.8MB (t14), -9%;
213.4MB before v0.1.3446.

Run: go vet ./internal/catalog ./internal/provider; go test -count=1
-timeout 45m ./internal/catalog ./internal/provider (ok, ok) on mote.
New TestMakerPriceKnownAllocatesNothing asks MakerPriced with the real
maker catalog list; with the 160-byte buffer put back by hand it fails
(1 allocation per ask), and it also fails if that list's key outgrows
1 KB. Not tried: Windows and Linux (no OS-specific code).
2026-11-10 02:10:10 +08:00
..