grpc / grpc/grpc-java

DefaultHttp2HeadersEncoder.encodeHeaders are slow

Open
#1,670 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

After GC and syscalls, `io.netty.handler.codec.http2.DefaultHttp2HeadersEncoder.encodeHeaders` takes the most CPU on a simple ping pong stress test. It accounts for about 3.3% of total program time. The offending line is:

https://github.com/netty/netty/blob/83c349ffa94d3992c4ee511d3625afc0c97c12bb/codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2HeadersEncoder.java#L68

I am not sure why this is so slow, but we should probably investigate it. My test does nothing special with headers.

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.