YuriGor / deepdash

eachDeep, filterDeep, findDeep, someDeep, omitDeep, pickDeep, keysDeep etc.. Tree traversal library written in Underscore/Lodash fashion
https://deepdash.io/
MIT License
274 stars 12 forks source link

condense deeply filtered data only when it's really needed #63

Closed YuriGor closed 4 years ago

YuriGor commented 4 years ago

As found in #62 - it makes sense to support childrenPath option in condenseDeep method. This way we can improve the performance of filterDeep in tree mode because condenseDeep will skip not children props.

YuriGor commented 4 years ago

using condenseDeep in filterDeep is not efficient. We should collect only array parents, where some element in the start/middle was filtered out.

YuriGor commented 4 years ago

done in v5.2.0 (filterDeep now is 2x faster because of this and some other optimizations)