stefanvanburen / buftui

TUI for the Buf Schema Registry
https://buf.build/bufbuild/registry
1 stars 0 forks source link

Figure out slowness in initial connection #72

Closed stefanvanburen closed 2 months ago

stefanvanburen commented 2 months ago
go run . --reference buf.build/bufbuild/registry

Running this, the reference seems to load almost instantaneously (based on the loading message), then the commits seem to take a long time to load (i.e. seconds). It seems like it should be spending all its time in the RPC request, but subsequent commit requests in the TUI seem to load much quicker.

Possibly an issue with httplb?

stefanvanburen commented 2 months ago

It's not an issue with httplb; a regular &http.Client{} is the same.

Interestingly, it seems like there's something clogging up the pipes, because if I add some logging around the actual RPC call in listCommits, it happens pretty instantaneously. So we have the commitsMsg, it's just not being picked up for a long time ...?

stefanvanburen commented 2 months ago

yeah, I don't get it — it's just insanely slow at the commitList := list.New — 5 seconds between logs there (????).

stefanvanburen commented 2 months ago

It's something to do with constructing the commitList model as I'm doing — if I move the list.New to run, everything is effectively instant.