Performance on findNodeForKey and findLinkForKey

Hi, if a diagram has n nodes and m edges, does findNodeForKey do the sequential lookup on the nodeDataArray with O(n) performance? And does findLinkForKey do the sequential lookup on the nodeLinkArray with O(m) performance?

Does GoJS do any internal caching or mapping to make the lookup more efficient?

Thanks,
Min

Internally, keys are stored in a Map, so performance of findNodeForKey should be more or less O(1)

Have you noticed access getting slower as the graph size gets larger, or something like that?

Hi Simon, fantastic! We have not noticed any performance issue and simply want to prevent it from happening. We plan to keep our own map if GoJS does not do it. But, it is good to know that you already guarantee O(1) performance for the lookup of both nodes and links!

Does GoJS documentation mention anything about the performance?

We do have a page of performance considerations: GoJS Performance Considerations -- Northwoods Software

But we do not keep any detailed overview otherwise.