-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Optimize request buffer release #12239 #12240
Optimize request buffer release #12239 #12240
Conversation
Alternative to #12228. In this PR, the responsibility to release the buffers is in 2 methods: onFillable() (called when network data is available, and to process the next request) and parseAndFillForContent() (called from Request.read()). Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Using the request executor to dispatch onFillable(). Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Ensure there is a request before accessing components
Release buffer after consumeAvailable
Still problems
…ary. Fixed failing tests that were not completing the Handler Callback. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Release request buffer before handling when there is no content
Release request buffer before handling when there is no content
…fferRelease # Conflicts: # jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpConnection.java
jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/HttpParser.java
Show resolved
Hide resolved
jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpConnection.java
Show resolved
Hide resolved
jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpConnection.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look simple enough, I think we should apply them to 12.0.x.
jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpConnection.java
Outdated
Show resolved
Hide resolved
@gregw this branch seems to reliably improve perf by about 5%. Here is a profiling run of vanilla 12.1.x: https://jenkins.webtide.net/job/load_testing/job/jetty-profiler-12.1.x/10 |
…12239/optimizeRequestBufferRelease
Fix #12239 by releasing an empty request buffer when it is known there is no content to read.