Skip to content

SOLR-18306: Optimize IndexSchema.getDynamicFieldType() by checking cached fields before matching dynamic patterns.#4630

Merged
psalagnac merged 3 commits into
apache:mainfrom
psalagnac:optimize-schema
Jul 13, 2026
Merged

SOLR-18306: Optimize IndexSchema.getDynamicFieldType() by checking cached fields before matching dynamic patterns.#4630
psalagnac merged 3 commits into
apache:mainfrom
psalagnac:optimize-schema

Conversation

@psalagnac

Copy link
Copy Markdown
Contributor

https://issues.apache.org/jira/browse/SOLR-18306

Description

This fixes a CPU hotspot in IndexSchema.getDynamicFieldType() by using the cache of dynamic fields before matching all the patterns of dynamic field names.

@dsmiley dsmiley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice!

@@ -0,0 +1,8 @@
title: Optimize IndexSchema.getDynamicFieldType() by checking cached fields before matching dynamic patterns.
type: other

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"changed" for a performance improvement

@psalagnac psalagnac added this to the 10.x milestone Jul 13, 2026
@psalagnac psalagnac merged commit 514e15b into apache:main Jul 13, 2026
4 of 5 checks passed
psalagnac added a commit that referenced this pull request Jul 13, 2026
…ched fields before matching dynamic patterns. (#4630)

This fixes a CPU hotspot in IndexSchema.getDynamicFieldType() by using the cache of dynamic fields before matching all the patterns of dynamic field names.

(cherry picked from commit 514e15b)
@psalagnac psalagnac deleted the optimize-schema branch July 13, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants