DefaultHttp2HeadersEncoder.encodeHeaders are slow
- Lenguaje dominante
- Java
- Estrellas
- 12.1k
- Forks
- 4k
- Merge medio
- 2 d 17 h
- PR fusionados (30 d)
- 37
Descripción
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.
Guía de contribución
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java
- Área
- backend-api-design, performance
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 35/100