You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Andrzej Bialecki (JIRA)" <ji...@apache.org> on 2018/10/03 12:14:00 UTC
[jira] [Updated] (SOLR-12725) ParseDateFieldUpdateProcessorFactory
should reuse ParsePosition
[ https://issues.apache.org/jira/browse/SOLR-12725?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrzej Bialecki updated SOLR-12725:
-------------------------------------
Fix Version/s: master (8.0)
> ParseDateFieldUpdateProcessorFactory should reuse ParsePosition
> ---------------------------------------------------------------
>
> Key: SOLR-12725
> URL: https://issues.apache.org/jira/browse/SOLR-12725
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Andrzej Bialecki
> Assignee: Andrzej Bialecki
> Priority: Minor
> Fix For: master (8.0)
>
>
> {{ParseDateFieldUpdateProcessorFactory.parseInstant}} repeatedly calls all configured date parsers ({{DateTimeFormatter}}-s) for each incoming date-like field. However, it uses {{DateTimeFormatter.parse(dateStr)}} method that needs to allocate a throwaway instance of {{ParsePosition}}, instead of {{DateTimeFormatter.parse(dateStr, parsePosition)}}.
> Javadocs for this method suggest reusing (and reseting) a single instance of {{ParsePosition}} for multiple calls in order to reduce object allocations.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org