Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metadata: reduce memory footprint in FromOutgoingContext #4360

Merged
merged 1 commit into from Apr 28, 2021

Commits on Apr 28, 2021

  1. metadata: reduce memory footprint in FromOutgoingContext

    When Looking at memory profiles for cockroachdb/cockroach, we observed
    that the intermediate metadata.MD array constructed to iterate over
    appended metadata escaped to the heap. Fortunately, this is easily
    rectifiable.
    
      go build -gcflags '-m' google.golang.org/grpc/metadata
      ...
      google.golang.org/grpc/metadata/metadata.go:198:13: make([]MD, 0, len(raw.added) + 1) escapes to heap
    irfansharif committed Apr 28, 2021
    Copy the full SHA
    db3ec93 View commit details
    Browse the repository at this point in the history