grpc / grpc/grpc-java

DefaultHttp2HeadersEncoder.encodeHeaders are slow

Ouverte
#1,670 6 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
performance
Langage dominant
Java
Étoiles
12.1k
Forks
4k
Merge moyen
2 j 17 h
PR mergées (30 j)
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.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Start at io.netty.handler.codec.http2.DefaultHttp2HeadersEncoder.encodeHeaders in codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2HeadersEncoder.java, around line 68, and reproduce the simple ping-pong stress test described in the issue. Profile the method to investigate the reported 3.3% CPU share. Done means the cause is identified and a validated performance improvement or clear conclusion is recorded.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java
Domaine
backend-api-design, performance
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.