Andrey Mashenkov created IGNITE-18897:
-----------------------------------------

             Summary: TopologyService must cache local ClusterNode.
                 Key: IGNITE-18897
                 URL: https://issues.apache.org/jira/browse/IGNITE-18897
             Project: Ignite
          Issue Type: Improvement
          Components: networking
            Reporter: Andrey Mashenkov
             Fix For: 3.0.0-beta2


As of now, ScaleCudeTopologyService.localMember() creates a new ClusterNode 
instance on each call.

This method used widely in the project, so it make sense to avoid unwanted 
instantiations.
Moreover, every message is checked if it is sent to a local node or not, and 
uses topologyService.localMember(). We can get faster equality checks if local 
ClusterNode will be a single object.

Let's cache ClusterNode object for the local node, 
and maybbe do the same for all objects using `intern()` ideas, like is is done 
in RelDataTypeFactoryImpl in Calcite (see Interners.newWeakInterner() from 
Guava)  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to