Open twolfson opened 11 years ago
If we need performance boosts, use a binary search node_module
. There are some other TODO
notes of interest:
// TODO: Find out how many words we have and treat it as a linear array
// TODO: Optimization, create a map of when each child starts in the word map so we can jump to them faster
// In the context of depth-first traversal
// TODO: Go to the last descedendant (all the way down the tree) of the last child, start breaking off words, if none removed there, then go up to next child
Perform binary search in nodeValue
section.
We are doing linear searches everywhere and testing against mainly text content. We should add in some performance tests and cross-browser thresholds with real data.