Files
magpie/internal/catalog
yetone 314940d2d6 catalog: SameModel leaves a plain model id as it is, without a regexp or a copy
SameModel ran modelGaps' ReplaceAllString and built a byte copy for every
id it was asked about, even one with nothing to change. The Providers
poll asks it for each provider's models, 21.5 MB of 540 MB over forty
polls with real accounts. An id with no underscore, whitespace or double
dash now skips the regexp, and one with no version dot to rewrite is
not copied.

TestSameModelPlainIDsAllocateNothing compares SameModel with the old
code over about 30 ids (underscores, tabs, no-break spaces, "--",
dotted versions, leading and trailing dashes) and checks a plain id
allocates nothing. Broken by hand both ways it goes red: allocations
back (4 to 5), and wrong answers with the plain-id check inverted.

Run on mote: the test alone 3 of 3, internal/catalog ok,
internal/provider ok, gofmt and vet clean. Real accounts in a sandbox
HOME, forty Providers polls: SameModel 21.5 MB -> 2.5 MB, state and
drift replies byte for byte the same as before. Not run: the GUI suite
(no GUI file changed).

Picked onto 27a0cbd17 (origin/main moved, nothing in internal/catalog or peak.go); not run again there.
2026-11-01 07:41:23 +08:00
..