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

Added caching of DatatypeFactory instances to ConstructionStrategies … #778

Merged
merged 1 commit into from
Dec 17, 2019
Merged

Added caching of DatatypeFactory instances to ConstructionStrategies … #778

merged 1 commit into from
Dec 17, 2019

Conversation

amohrig
Copy link
Contributor

@amohrig amohrig commented Dec 17, 2019

…(#777)

Issue link

[ISSUE: 777] Performance problem for XMLGregorianCalendar caused by ConstructionStrategies

Purpose

Fix performance issue described in issue #777

Approach

Caching of the DatatypeFactory instance used for creating XMLGregorianCalendar instances is added.
We have a patched version of Dozer 6.2 including this change running for over a year now, processing > a million messages per day.
The caching in a ThreadLocal works for us, although it is probably unnecessary given the implementation we have. For a widely used project it seems appropriate, though. Please advise if we should just drop it and use simpler caching (as already done in com.github.dozermapper.core.converters.XMLGregorianCalendarConverter).

Open Questions and Pre-Merge TODOs

  • Issue created
  • Unit tests pass
  • Documentation updated -> Don't think this is required
  • Travis build passed

@garethahealy garethahealy merged commit 2114be1 into DozerMapper:master Dec 17, 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

Successfully merging this pull request may close these issues.

3 participants