-
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
Improve Attributes Handling #4816
Conversation
Improve attribute handling to reduce garbage and improve lookup. Introduced a Wrapper so that request can remove any layers on reset. Signed-off-by: Greg Wilkins <gregw@webtide.com>
Redo of this PR without Attributes improvements (moved to #4816). Add a ConnectionFactory.Configuring interface to all connectors to be configured during doStart. I have some concern about shared HttpConfigurations. Signed-off-by: Greg Wilkins <gregw@webtide.com>
The underlying AttributesMap already has a .getAttributeNameSet() method, expose it on the Attributes interface. Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
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.
I added commit d460786 to this PR to expose the AttributesMap.getAttributeNameSet() on the Attributes interface and use it.
Feel free to reject / rollback it if you don't like that change.
Since this PR is an effort to reduce GC, this change eliminates the intermediary Enumeration on some code paths.
jetty-server/src/main/java/org/eclipse/jetty/server/SecureRequestCustomizer.java
Outdated
Show resolved
Hide resolved
jetty-server/src/main/java/org/eclipse/jetty/server/SecureRequestCustomizer.java
Outdated
Show resolved
Hide resolved
@joakime I like the Set access, but that method now also needs to be overridden in the wrapping Attributes... actually if done right then |
Yup, I can take care of that. |
jetty-server/src/main/java/org/eclipse/jetty/server/SecureRequestCustomizer.java
Show resolved
Hide resolved
Signed-off-by: Greg Wilkins <gregw@webtide.com>
The Attributes.getAttributeNames() will use the .getAttributeNameSet() by default now. Updated all Attributes.Wrapper impls to use this new behavior Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
…m:eclipse/jetty.project into jetty-9.4.x-4814-ImproveAttributeHandling
jetty-server/src/main/java/org/eclipse/jetty/server/SecureRequestCustomizer.java
Show resolved
Hide resolved
I think no matter what, if one of those attributes is set we should return that value. |
* Issue #4814 Configuring Connection Factory Redo of this PR without Attributes improvements (moved to #4816). Add a ConnectionFactory.Configuring interface to all connectors to be configured during doStart. I have some concern about shared HttpConfigurations. Signed-off-by: Greg Wilkins <gregw@webtide.com> * updates from review Signed-off-by: Greg Wilkins <gregw@webtide.com>
Spun out from #4814
Improve attribute handling to reduce garbage and improve lookup.
Introduced a Wrapper so that request can remove any layers on reset.
Signed-off-by: Greg Wilkins gregw@webtide.com