libc v1.67.6's netdb package had an init() that read and parsed
/etc/protocols and /etc/services on every launch: 3.66 MB and 44k
allocations, ~3-4 ms, with ~1.9 MB kept for the life of the gateway.
libc v1.78.0 and later load it through a sync.Once on first use, and
magpie never looks a service up. `magpie statusline`, which Claude Code
runs on every message, pays this on each launch.
Bumped (all released more than two weeks ago): modernc.org/sqlite
v1.44.3 -> v1.61.0, libc v1.67.6 -> v1.79.0, memory v1.11.0 -> v1.12.1,
golang.org/x/sys v0.46.0 -> v0.49.0, go-humanize, go-isatty and
go-strftime as sqlite's go.mod pins them. go mod tidy.
Measured on mote (M5 Pro), sandbox HOME with a copy of real accounts,
main e697e7ddf vs this change:
- GODEBUG=inittrace=1: init 16.7 MB / 150k allocs -> 13.0 MB / 106k;
the netdb line is gone.
- `echo {} | magpie statusline` under /usr/bin/time -l, 3 runs each:
instructions retired 324-330M -> 254-278M (about -20%), peak
footprint 24.6-25.1 MB -> 22.3-22.6 MB.
Run: go vet ./... (mote); GOOS=linux and GOOS=windows go vet of
internal/sqlitedb, internal/agent, internal/provider; go test
internal/sqlitedb, internal/agent and internal/provider -run
'Cherry|Cindy|Aion|Newmax|Import|SQLite' (the sqlite readers): ok.
Not run: the full go test ./... suite before the push.
65 lines
2.5 KiB
AMPL
65 lines
2.5 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/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/atotto/clipboard v0.1.4 // indirect
|
|
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // 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/dustin/go-humanize v1.1.0 // indirect
|
|
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // 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/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
|
github.com/rivo/uniseg v0.4.7 // indirect
|
|
github.com/tidwall/match v1.1.1 // indirect
|
|
github.com/tidwall/pretty v1.2.0 // indirect
|
|
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
|
|
modernc.org/mathutil v1.7.1 // indirect
|
|
modernc.org/memory v1.12.1 // indirect
|
|
)
|