Improve the logic using Erase-Remove Idiom. 36/242436/6
authorSubhransu Mohanty <sub.mohanty@samsung.com>
Thu, 27 Aug 2020 03:57:28 +0000 (12:57 +0900)
committerDavid Steele <david.steele@samsung.com>
Tue, 3 Nov 2020 15:47:09 +0000 (15:47 +0000)
commit609211a7492d40e56d896c709fb2591302b0aa2a
treebb643d35540a5a9af1e6b41423c2754ced80574c
parentac8ca1e31eb26a764786f09938bfbd10103cf6be
Improve the logic using Erase-Remove Idiom.

instead of erasing each element found and restarting the
loop again . first find all element and move them to the end
of list and then erase them once using std::erase(std::remove_if()).

This will improve the cache locality as this will avoid lot ofpointer chaseing.
Also avoids expensing Dali::Vector::end() call.

Change-Id: I306de3f017ef23ea7d4d1e6e5202940f84fcf872
dali/devel-api/common/owner-container.h
dali/internal/update/animation/scene-graph-animation.cpp