nfsantos commented on code in PR #2110:
URL: https://github.com/apache/jackrabbit-oak/pull/2110#discussion_r1967657652
##########
oak-search/src/main/java/org/apache/jackrabbit/oak/plugins/index/search/spi/editor/FulltextDocumentMaker.java:
##########
@@ -456,7 +452,10 @@ private List<String> newBinary(
private boolean indexNotNullCheckEnabledProps(String path, D doc,
NodeState state) {
boolean fieldAdded = false;
- for (PropertyDefinition pd :
indexingRule.getNotNullCheckEnabledProperties()) {
+ List<PropertyDefinition> props =
indexingRule.getNotNullCheckEnabledProperties();
+ // Performance critical code: using indexed traversal to avoid
creating an iterator instance.
+ for (int i=0; i<props.size(); i++) {
Review Comment:
Done
##########
oak-search/src/main/java/org/apache/jackrabbit/oak/plugins/index/search/spi/editor/FulltextDocumentMaker.java:
##########
@@ -502,7 +507,9 @@ private PropertyState calculateValue(String path, NodeState
state, String[] func
private boolean indexIfSinglePropertyRemoved(List<PropertyState>
propertiesModified) {
boolean dirty = false;
- for (PropertyState ps : propertiesModified) {
+ // Performance critical code: using indexed traversal to avoid
creating an iterator instance.
+ for (int i=0; i<propertiesModified.size(); i++) {
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]