grpc / grpc/grpc-java

Excess garbage in Metadata

Open
#2,166 6 comments 0 reactions 0 assignees View on GitHub
performance
Dominant language
Java
Stars
12.1k
Forks
4k
Avg merge
2d 17h
Merged PRs (30d)
37

Description

Metadata today is a Hashmap of ArrayLists, and each arraylist has an object array. This creates a lot of garbage since Metadata objects are short lived.

Some ideas on how to improve the situation:
- Recycle the objects
- Store headers as a flat array of an initial size, and swap to using a full map if slow. (and avoid Strings when possible)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.