Files
magpie/go.mod
T
yetone 0caa09b3d9 perf: yaml's event queue, TOMLWithout's buffer and the catalog's hash stop holding whole documents
A start with the owner's real accounts (release build, mote) allocated
279 MB in its first seven minutes; three of the largest were buffers
the size of a whole document that nothing needed whole:

- yaml.v3's emitter appends every event to a queue it never empties,
  so encoding dsh's route of a few hundred models held ~24 MB of
  events (dshPutProviders' Node.Encode and dshNodeLines). That round
  runs on the first start of each version and on each catalog change.
  yaml.v3 is vendored in third_party/yaml.v3 (replace in go.mod, as
  jsonschema is) with the queue started again once it is drained;
  MAGPIE.md says what changed. go.yaml.in/yaml/v3 v3.0.5 has the same
  queue.
- edit.TOMLWithout made its output as large as the input: 1.5 MB per
  read of Codex's config, which five readers make, to keep a few KB
  around the projects tables. It now grows to what is kept.
- catalog.fileKey read the ~6 MB catalog whole to hash it; it is now
  hashed as it is read.

Measured with the owner's real accounts (~/r2278/acct, tray only, no
window), release ldflags and the footprint overlay, a version new to
the HOME so dsh's full round runs, on mote:
- allocations in the first 7 minutes 279 MB -> 260 MB;
  yaml_emitter_emit 24.9 MB -> under pprof's cut (1.3 MB),
  dshPutProviders 23.1 -> 8.1 MB, dshNodeLines 12 MB -> under the cut,
  edit.tomlUnder 12.2 -> 4.0 MB
- footprint at +300 s 59 -> 58 MB, live heap 5.5 MB both; peak 84 vs
  89 MB, within the run-to-run spread seen before (84-88 MB)

Run at this tree: upstream yaml.v3's own tests on the patched emitter
(go test ., ok); go test ./internal/agent ./internal/cli ./internal/edit
./internal/library ./internal/pluginrt ./internal/catalog on mica (ok),
and ./internal/sessions on mote before the yaml change (ok); go vet ./...
(mac), GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet ./...
ok; gofmt -l on the changed files prints nothing.
Not run: the full suite.
2026-11-14 14:33:16 +08:00

131 lines
6.0 KiB
AMPL

module github.com/yetone/magpie
go 1.26.8
require (
github.com/MoeForge/moejs v0.1.0
github.com/charmbracelet/bubbles v0.21.1
github.com/charmbracelet/bubbletea v1.3.10
github.com/charmbracelet/lipgloss v1.1.1-0.20250404203927-76690c660834
github.com/clipperhouse/uax29/v2 v2.5.0
github.com/coder/websocket v1.8.14
github.com/dlclark/regexp2 v1.11.5
github.com/fsnotify/fsnotify v1.9.0
github.com/gen2brain/h265 v0.2.4
github.com/go-ole/go-ole v1.3.0
github.com/godbus/dbus/v5 v5.2.2
github.com/google/uuid v1.6.0
github.com/klauspost/compress v1.18.3
github.com/pelletier/go-toml/v2 v2.2.4
github.com/santhosh-tekuri/jsonschema/v6 v6.0.3
github.com/sigstore/sigstore-go v1.1.4
github.com/tidwall/gjson v1.19.0
github.com/tidwall/jsonc v0.3.3
github.com/wailsapp/wails/v3 v3.0.0-beta.24
golang.org/x/image v0.43.0
golang.org/x/net v0.56.0
golang.org/x/sys v0.49.0
golang.org/x/term v0.44.0
golang.org/x/text v0.39.0
gopkg.in/yaml.v3 v3.0.1
modernc.org/libc v1.79.0
modernc.org/sqlite v1.61.0
)
require (
git.sr.ht/~jackmordaunt/go-toast/v2 v2.0.3 // indirect
github.com/MoeForge/moego v0.1.0-alpha.1 // indirect
github.com/adrg/xdg v0.5.3 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/atotto/clipboard v0.1.4 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/blang/semver v3.5.1+incompatible // indirect
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
github.com/charmbracelet/colorprofile v0.4.1 // indirect
github.com/charmbracelet/x/ansi v0.11.5 // indirect
github.com/charmbracelet/x/cellbuf v0.0.15 // indirect
github.com/charmbracelet/x/term v0.2.2 // indirect
github.com/clipperhouse/displaywidth v0.9.0 // indirect
github.com/clipperhouse/stringish v0.1.1 // indirect
github.com/cyberphone/json-canonicalization v0.0.0-20241213102144-19d51d7fe467 // indirect
github.com/digitorus/pkcs7 v0.0.0-20230818184609-3a137a874352 // indirect
github.com/digitorus/timestamp v0.0.0-20231217203849-220c5c2851b7 // indirect
github.com/dustin/go-humanize v1.1.0 // indirect
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/analysis v0.24.1 // indirect
github.com/go-openapi/errors v0.22.4 // indirect
github.com/go-openapi/jsonpointer v0.22.1 // indirect
github.com/go-openapi/jsonreference v0.21.3 // indirect
github.com/go-openapi/loads v0.23.2 // indirect
github.com/go-openapi/runtime v0.29.2 // indirect
github.com/go-openapi/spec v0.22.1 // indirect
github.com/go-openapi/strfmt v0.25.0 // indirect
github.com/go-openapi/swag v0.25.4 // indirect
github.com/go-openapi/swag/cmdutils v0.25.4 // indirect
github.com/go-openapi/swag/conv v0.25.4 // indirect
github.com/go-openapi/swag/fileutils v0.25.4 // indirect
github.com/go-openapi/swag/jsonname v0.25.4 // indirect
github.com/go-openapi/swag/jsonutils v0.25.4 // indirect
github.com/go-openapi/swag/loading v0.25.4 // indirect
github.com/go-openapi/swag/mangling v0.25.4 // indirect
github.com/go-openapi/swag/netutils v0.25.4 // indirect
github.com/go-openapi/swag/stringutils v0.25.4 // indirect
github.com/go-openapi/swag/typeutils v0.25.4 // indirect
github.com/go-openapi/swag/yamlutils v0.25.4 // indirect
github.com/go-openapi/validate v0.25.1 // indirect
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/google/certificate-transparency-go v1.3.2 // indirect
github.com/google/go-containerregistry v0.20.7 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 // indirect
github.com/in-toto/attestation v1.1.2 // indirect
github.com/in-toto/in-toto-golang v0.9.0 // indirect
github.com/lucasb-eyer/go-colorful v1.3.0 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.24 // indirect
github.com/mattn/go-localereader v0.0.1 // indirect
github.com/mattn/go-runewidth v0.0.19 // indirect
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
github.com/muesli/cancelreader v0.2.2 // indirect
github.com/muesli/termenv v0.16.0 // indirect
github.com/ncruces/go-strftime v1.1.0 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/secure-systems-lab/go-securesystemslib v0.9.1 // indirect
github.com/shibumi/go-pathspec v1.3.0 // indirect
github.com/sigstore/protobuf-specs v0.5.0 // indirect
github.com/sigstore/rekor v1.4.3 // indirect
github.com/sigstore/rekor-tiles/v2 v2.0.1 // indirect
github.com/sigstore/sigstore v1.10.0 // indirect
github.com/sigstore/timestamp-authority/v2 v2.0.3 // indirect
github.com/theupdateframework/go-tuf/v2 v2.3.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/transparency-dev/formats v0.0.0-20251017110053-404c0d5b696c // indirect
github.com/transparency-dev/merkle v0.0.2 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
go.mongodb.org/mongo-driver v1.17.6 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/otel v1.38.0 // indirect
go.opentelemetry.io/otel/metric v1.38.0 // indirect
go.opentelemetry.io/otel/trace v1.38.0 // indirect
go.yaml.in/yaml/v3 v3.0.5 // indirect
golang.org/x/crypto v0.53.0 // indirect
golang.org/x/mod v0.42.0 // indirect
golang.org/x/sync v0.24.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250929231259-57b25ae835d4 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20251103181224-f26f9409b101 // indirect
google.golang.org/grpc v1.76.0 // indirect
google.golang.org/protobuf v1.36.10 // indirect
modernc.org/mathutil v1.7.1 // indirect
modernc.org/memory v1.12.1 // indirect
)
replace github.com/santhosh-tekuri/jsonschema/v6 => ./third_party/jsonschema
replace gopkg.in/yaml.v3 => ./third_party/yaml.v3