imbajin commented on code in PR #3122:
URL: https://github.com/apache/hugegraph/pull/3122#discussion_r3659915314


##########
hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/ConditionQuery.java:
##########
@@ -631,10 +631,12 @@ public boolean test(HugeElement element) {
          * so don't break early even if test() return false.
          */
         boolean valid = true;
+        Map<Id, Boolean> rangeIndexMatches = new HashMap<>();

Review Comment:
   ⚠️ This unconditionally allocates a new `HashMap` for every candidate 
element passed through `test()`, including queries where `element2IndexValueMap 
== null` and the map is never used. Because this is the per-element filtering 
path, broad scans now create O(N) short-lived maps and add avoidable GC 
pressure outside repeated-range queries. Please create the tracker only when 
range-index checking is active, preferably lazily or only when duplicate range 
properties exist, so ordinary queries retain the previous allocation profile.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to