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

StdDateFormat: performance improvement of '_parseAsISO8601(...)' #1754

Closed
brenuart opened this issue Aug 28, 2017 · 1 comment
Closed

StdDateFormat: performance improvement of '_parseAsISO8601(...)' #1754

brenuart opened this issue Aug 28, 2017 · 1 comment
Milestone

Comments

@brenuart
Copy link
Contributor

brenuart commented Aug 28, 2017

Following the same rational as in #1749, the calendar instance used during parsing in parseAsISO8601(...) could be reused across invocations.

What you think ?

@brenuart brenuart changed the title StdDateFormat: performance improvement of '_parseISO8601(...)' StdDateFormat: performance improvement of '_parseAsISO8601(...)' Aug 28, 2017
@cowtowncoder
Copy link
Member

I think that might be a good idea. Looking at deserialization side I think DateFormat is actually cloned as well (first I thought it wasn't, but DeserializationContext.getDateFormat() does actually clone it), so reuse should be possible.
Still, I am almost tempted to attempt writing multi-threaded test just in case ... since failures wrt non-synchronized shared resources can be pretty nasty.

But there's bit of choreography still, wrt ensuring correct timezone and leniency settings are used (and perhaps Locale -- not 100% if it has any effect, but it is set on GregorianCalendar).

So, +1 for this.

@cowtowncoder cowtowncoder added this to the 2.9,0.pr4 milestone Sep 7, 2017
@cowtowncoder cowtowncoder modified the milestones: 2.9,0.pr4, 2.9.1 Sep 7, 2017
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

2 participants