efl_ui_item_container: speed up item lookup
authorMarcel Hollerbach <mail@marcel-hollerbach.de>
Wed, 24 Jul 2019 18:49:38 +0000 (20:49 +0200)
committerWooHyun Jung <wh0705.jung@samsung.com>
Mon, 5 Aug 2019 01:47:32 +0000 (10:47 +0900)
commit14ff7fb9d242548f63e3ad2fab9148fe4ec78d03
tree6b23bc910da00480fefc5a5392ab53bac2901ca2
parentf195f89b14cf497d57889f1bb62574db265ac2a6
efl_ui_item_container: speed up item lookup

the problem with accessor is that the normal eina accessor is only for
immutable lists, by the time you change the list, the accessor has a
problem and might crash. This would mean we have to recreate the
accessors after every change to the internal list representation, which
would invalidate the cache all the time.

The usage of grid and list here is also very performant in cache using,
all the usages normally iterate forward or backward, which makes this
cache really helpfull.

With this commit the lookup of sizes is improved a lot, because
eina_list_nth is not used anymore. (Cuts of ~90ms in creation time)

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9387
src/lib/elementary/efl_ui_item_container.c