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

Better caching of parsers in DateProcessor #95299

Merged
merged 1 commit into from
Apr 18, 2023

Conversation

joegallo
Copy link
Contributor

Follow up to #92880, it introduced this caching, but actually we can do even better than that PR did.

The ZoneId and Locale are expensive to create -- they're better behind the cache rather than keying into it.

Screen Shot 2023-04-17 at 11 25 43 AM

In the above screenshot, DateProcessor.execute is taking 3.86% of the profile, and DateProcess.newLocale is taking 0.53%, so better caching could give us a ~13% speedup on the DateProcessor in question. This caching would be faster for any DateProcessors that have a locale or timezone configured.

The ZoneId and Locale are expensive to create -- they're better behind
the cache rather than keying into it.
@joegallo joegallo added :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP >refactoring Team:Data Management Meta label for data/management team v8.8.0 labels Apr 17, 2023
@joegallo joegallo requested a review from HiDAl April 17, 2023 15:30
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

Copy link
Contributor

@HiDAl HiDAl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏽

@joegallo joegallo merged commit 82220b4 into elastic:main Apr 18, 2023
@joegallo joegallo deleted the ingest-date-processor-caching-fix branch April 18, 2023 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP >refactoring Team:Data Management Meta label for data/management team v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants