mbien commented on PR #8411: URL: https://github.com/apache/netbeans/pull/8411#issuecomment-2798871278
trying to figure out what the purpose of the ElementHandle deduplication code is. Its not for instance comparison reasons, since ```java $a == $b :: $a instanceof org.netbeans.api.java.source.ElementHandle && $b instanceof org.netbeans.api.java.source.ElementHandle && !isNullLiteral($b) => $a.equals($b) ;; $a != $b :: $a instanceof org.netbeans.api.java.source.ElementHandle && $b instanceof org.netbeans.api.java.source.ElementHandle && !isNullLiteral($b) => !$a.equals($b) ;; ``` produced no relevant hits. Here is the original commit https://github.com/emilianbold/netbeans-releases/commit/3dab46154632a3b668d64483c855507fbb6c16c5 referencing https://bz.apache.org/netbeans/show_bug.cgi?id=197743 https://bz.apache.org/netbeans/show_bug.cgi?id=197743#c2 indicates it was one of the changes to attempt to reduce memory consumption in large files. Will check if this deduplication cache could be removed again. A new handle has to be created first before checking if it is already there (no construction overhead reduction) and secondly the Object itself is just two constants: `ElementKind` and a String array for its signatures. Would have been good to still have the original performance test file for this (Big.java). -- 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: notifications-unsubscr...@netbeans.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org For additional commands, e-mail: notifications-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists