[
https://issues.apache.org/jira/browse/SOLR-18306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18095852#comment-18095852
]
ASF subversion and git services commented on SOLR-18306:
--------------------------------------------------------
Commit 514e15b46673e68e61c2505ce1dd7aad686835c1 in solr's branch
refs/heads/main from Pierre Salagnac
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=514e15b4667 ]
SOLR-18306: Optimize IndexSchema.getDynamicFieldType() by checking cached
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.
> Dynamic field patterns are applied without caching when retrieving field types
> ------------------------------------------------------------------------------
>
> Key: SOLR-18306
> URL: https://issues.apache.org/jira/browse/SOLR-18306
> Project: Solr
> Issue Type: Bug
> Components: Schema and Analysis
> Affects Versions: 9.10, 10.0
> Reporter: Pierre Salagnac
> Priority: Minor
> Labels: pull-request-available
> Attachments: profiler.png
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> I noticed unexpected CPU usage in {{{}IndexSchema.getDynamicFieldType(){}}}.
> This methods always tries to match a field name by iterating over all dynamic
> field types of the schema. Depending of the number of declared dynamic
> fields, this can be a waste of CPU cycles.
> Since we already have a cache for the fields, we may easily retrieve the type
> for the cache for the fields that are present.
>
>
> !profiler.png!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]