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

Remove reflection from Connector.java #267

Closed

Conversation

fhanik
Copy link
Member

@fhanik fhanik commented Apr 6, 2020

I will start a discussion on dev@tomcat.apache.org

TL;DR; We are using Apache Tomcat embedded in native images (GraalVM).
Reflection causes images to be unnecessarily large, and Apache Tomcat has many places where reflection can be avoided in an embedded scenario.

@fhanik fhanik self-assigned this Apr 6, 2020
@rmaucher
Copy link
Contributor

rmaucher commented Apr 6, 2020

The main target of Tomcat remains Tomcat standalone, server.xml and the digester. So this means tons of reflection here and there, and I expect it will stay that way.
You're in luck here since the Connector is a mess and some things could be improved. You need to continue working on the PR though, as the code changed to be less messy already.

@fhanik
Copy link
Member Author

fhanik commented Apr 7, 2020

AbstractProtocol and AbstractEndpoint use reflection for all property setters. This change is a step in the right direction, but only has minimal impact.

@fhanik
Copy link
Member Author

fhanik commented Apr 9, 2020

Closed per discussion on mailing list

@fhanik fhanik closed this Apr 9, 2020
@fhanik fhanik deleted the refactor/connector_remove_reflection branch June 30, 2020 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants