Skip to content
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

Merged
merged 5 commits into from
Apr 28, 2020

Conversation

gregw
Copy link
Contributor

@gregw gregw commented Apr 27, 2020

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

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>
gregw added a commit that referenced this pull request Apr 27, 2020
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>
Copy link
Contributor

@joakime joakime left a 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.

@gregw
Copy link
Contributor Author

gregw commented Apr 27, 2020

@joakime I like the Set access, but that method now also needs to be overridden in the wrapping Attributes... actually if done right then getAttributeNameSet needs to be overridden and getAttributeNames can use that. As it currently is, any body calling getAttributeNameSet will not see the extra names on a forward or include. Can you fix?

@joakime
Copy link
Contributor

joakime commented Apr 27, 2020

@joakime I like the Set access, but that method now also needs to be overridden in the wrapping Attributes... actually if done right then getAttributeNameSet needs to be overridden and getAttributeNames can use that. As it currently is, any body calling getAttributeNameSet will not see the extra names on a forward or include. Can you fix?

Yup, I can take care of that.

gregw and others added 3 commits April 27, 2020 15:32
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
@joakime
Copy link
Contributor

joakime commented Apr 27, 2020

@gregw the change you asked for to impl Set in wrapper can be found in commit 663ef83

@gregw
Copy link
Contributor Author

gregw commented Apr 28, 2020

I think no matter what, if one of those attributes is set we should return that value.

@gregw gregw merged commit 8fcbf6d into jetty-9.4.x Apr 28, 2020
@gregw gregw deleted the jetty-9.4.x-4814-ImproveAttributeHandling branch April 28, 2020 08:57
gregw added a commit that referenced this pull request Apr 29, 2020
* 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>
@gregw gregw mentioned this pull request Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants