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

Optimize construction of ArrayList, LinkedHashMap instances #1289

Closed
cowtowncoder opened this issue Jul 7, 2016 · 1 comment
Closed

Optimize construction of ArrayList, LinkedHashMap instances #1289

cowtowncoder opened this issue Jul 7, 2016 · 1 comment
Milestone

Comments

@cowtowncoder
Copy link
Member

One small but useful optimization that jackson-jr does is to use direct calls to a small set of "well-known" container types; ArrayList, LinkedHashMap and perhaps HashMap, instead of going through reflection. It seems simple enough to do this here as well, perhaps by just implementing alternate AnnotatedWithParams to use via StdValueInstantiator.

@cowtowncoder
Copy link
Member Author

cowtowncoder commented Jul 12, 2016

Optimization already existed, actually, although was not getting invoked. Fixed for 2.8.1.

Performance impact limited at least for tests we have, since time taken for Map/List construction is still usually a small portion of all overhead.

@cowtowncoder cowtowncoder modified the milestones: 2.8, 2.8.1 Jul 12, 2016
@cowtowncoder cowtowncoder changed the title Optimize std construction of ArrayList, LinkedHashMap Optimize construction of ArrayList, LinkedHashMap instances Jul 12, 2016
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

No branches or pull requests

1 participant