Skip to content

Web viewer: every server-tab switch re-downloads the whole fleet roll-up (/api/fleet, 66–81 KB) to render one server's header card #4190

Closed

Description

@erikdarlingdata

Problem

The server page's header card (band, CPU, memory, blocking, and so on) comes from loadServerCard(). That calls apiGetFleet() and searches the whole roll-up for the one matching card. The server page re-renders on every sub-tab switch and on every 60 s poll, so each tab click fetches the entire fleet roll-up again. apiGetFleet only shares a request between callers that are in flight at the same moment (#3895). Nothing survives across navigation.

Measured

Production stores, build 3.8.0-nightly.20260924.467, 2026-09-25. Browser timing on one server's 12 SQL Server tabs and one PostgreSQL target's 8 tabs:

  • Every one of the 20 tab opens included GET /api/fleet: 65.6 KB on a 43-server store and 78.9 KB on a 50-target store.
  • On an otherwise idle tab it took 0.12–0.33 s.
  • When it ran beside a heavy tab's own reads it was one of the slowest calls on the page: 0.94 s on I/O, 1.0 s on Config, 1.8–2.1 s on Queries. That's the header card waiting behind the store's widest read.
  • It's 66–81 KB per tab click for one card of roughly 1.5 KB. Over a 12-tab walk that's ~0.8 MB of fleet data, most of it other servers'.

Where

  • Darling/PerformanceMonitor.Darling.Service/wwwroot/js/pages/server.js, loadServerCard() ~:199–215: const res = await apiGetFleet(); then res.data.cards.find(...).
  • wwwroot/js/util.js, apiGetFleet() ~:366+: joins an in-flight request only. By design nothing outlives the response.

Fix shape

Any one of these, cheapest first:

  1. Reuse within the page. Cache the server's card in the server page's module state for the life of the route and its sub-tab switches. Refresh it on the 60 s poll, not on tab clicks.
  2. Keep the last fleet response in the shell with its generated_at, and let loadServerCard use it when it's newer than the poll interval. The sidebar already fetched it seconds earlier.
  3. A per-server card endpoint, GET /api/fleet/card?server=…, that computes one card instead of 43–50. That also helps saved views that show one server.

Pin: a web test that switching between two tabs of one server issues no /api/fleet request (with 1 or 2).

Activity

  1. added
    enhancementNew feature or request
    client-siteOwned by the client-site agents (other laptop). Local sessions never pick these up.
    in-progressActively being worked by a local session or its agents (PR open or in flight)
    on Sep 25, 2026
  2. erikdarlingdata commented on Sep 25, 2026

    @erikdarlingdata
    OwnerAuthor

    Closed by the watcher: delivered in PR #4204, merged to dev.

  3. removed
    in-progressActively being worked by a local session or its agents (PR open or in flight)
    on Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    client-siteOwned by the client-site agents (other laptop). Local sessions never pick these up.enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions