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 ValueInstantiator construction for default Collection, Map types #2416

Closed
cowtowncoder opened this issue Aug 7, 2019 · 0 comments
Closed
Milestone

Comments

@cowtowncoder
Copy link
Member

Based on profiling it looks like attempts to discover creator for default Collection (ArrayList) and Map (LinkedHashMap) types is a huge time sink, even thought actual creator in both cases will just be the default constructor. While this lookup cost is usually amortized across many calls it is a problem for cold-start case, including usage on Android platform, Lambda services and possibly some stream processing (spark streaming?).
The main reason is that some common usage (such as binding as "untyped" (nominal type of java.lang.Object) or as List / Map) will use this codepath.

So let's see handling can be changed to short-cut these 2 common cases.

@cowtowncoder cowtowncoder added this to the 2.10.0.pr2 milestone Aug 7, 2019
@cowtowncoder cowtowncoder changed the title Optimize ValueInstantiator handling for default Collection, Map types Optimize ValueInstantiator construction for default Collection, Map types Aug 7, 2019
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