-
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
Review temporary buffer usage #5048
Comments
- avoid readOnly buffers if possible for access to the array - other cleanups to related code Signed-off-by: Lachlan Roberts <[email protected]>
…plementations Signed-off-by: Lachlan Roberts <[email protected]>
…plementations Signed-off-by: Lachlan Roberts <[email protected]>
- avoid readOnly buffers if possible for access to the array - other cleanups to related code Signed-off-by: Lachlan Roberts <[email protected]>
…plementations Signed-off-by: Lachlan Roberts <[email protected]>
We've bumped into this issue recently, any plans to tackle this in the near future? |
@paplorinc Yes, I have been working on a PR for this, although it will probably not make 9.4.31. |
Hey Lachlan, we'd like to reuse buffers when sending and receiving binary messages, i.e. |
@paplorinc PR #5045 should improve the temporary buffer usage for small binary messages. But we are still not reusing the buffers. We use In the case of a single frame binary message, we should be able to avoid the |
Hey Lachlan, thanks for the update. |
Take a look at MessageInputStream, this will allow you to declare an
Jetty |
Unfortunately we need JDK 8 compatibility - is it possible to backport the buffer usage optimizations to 9.x? |
@paplorinc Jetty-9 is in feature freeze other than for sponsored work for our commercial clients. We have to give priority to stability in 9 rather than features, so we now do not back port work from 10 unless there is good reason to, especially with websocket, where the implementations are significantly different and the risk of breaking something is high. Thus we are unlikely to do this ourselves. However, if you wanted to prepare a PR for jetty-9, then we would consider it, but there will still be a high bar for inclusion for any significant changes that risk stability. |
This issue has been automatically marked as stale because it has been a |
This issue has been closed due to it having no activity. |
Jetty version
9.4.x, 10.0.x
Description
See #5045 for some background. After looking at that issue, it is apparent that when we fail to do all our writing as channels, we are probably doing a very bad job in regards to too many copies into temporary buffers and not reusing those temporary buffers:
The text was updated successfully, but these errors were encountered: