Skip to content

perf(xds): precompute GAMMA route domains and extension-strip results at write time #540

Closed

Description

@bpalermo

Two per-snapshot recomputations of write-time-stable data:

  1. agent/internal/xds/cache/capture.go:650-664 — routeTargetDomains() rebuilds domain lists via fmt.Sprintf("%s:%d", ...) in nested loops (base names × ports) on every snapshot.
  2. agent/internal/xds/cache/gamma.go:65-109 — serviceRoutesSnapshot() runs stripUnavailableExtensions() per snapshot, scanning + copying every rule even when there is nothing to strip.

Fix: compute both at mutation time (SetServiceRoutes / SetRouteTargetPorts / authz-availability change) and cache the results; the snapshot path reads only. No behavior change — same domains, same strip semantics.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions