krisrs1128 / treelapse

timelapse + trees = treelapse
http://krisrs1128.github.io/treelapse
8 stars 0 forks source link

Avoid traversing whole tree for .contains_node() method #84

Open krisrs1128 opened 8 years ago

krisrs1128 commented 8 years ago

Right now, contains_node() in doi_utils.js does a full depth-first search to identify whether the tree contains a certain node. This is not necessary -- just return once the first matching node is found.

krisrs1128 commented 8 years ago

This same issue applies to contains_partial_match().