mbien commented on PR #4440: URL: https://github.com/apache/netbeans/pull/4440#issuecomment-1198431535
> In regards to optimization, we could us a wrapper `CharSequence` to avoid creating 3 Strings when we check a method. That would require modifications to other methods as well. Another possible solution is to filter through the members in parallel. string concatenation is rarely a problem. The JVM became very good at optimizing this. Most String ops are intensified. I wouldn't optimize anything by hand before knowing that this is actually a problem. But I would change it to the version i proposed at https://github.com/apache/netbeans/pull/4440#discussion_r931630020, since it creates the strings lazily/on-demand and is more compact/easier to read as bonus. Its just that the non-matching case has 4 times more checks than before this PR. Would be good to test and show that this is in fact a non-issue. e.g generate a class with a few thousand methods/fields and compare before and after this PR. Even if this turns out to be a problem there would be more paths we could take: e.g making this feature configurable/optional. -- 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] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
