ui: item cache size init

This commit is contained in:
Alastair Poole 2020-04-18 02:35:02 +01:00
parent 8ddb2e8ef0
commit 68c56667bc
1 changed files with 3 additions and 1 deletions

View File

@ -17,6 +17,8 @@ static Eina_Lock _lock;
static Eina_List *_list = NULL;
static Evisum_Config *_evisum_config = NULL;
#define ITEM_CACHE_INIT_SIZE 50
typedef struct _Item_Cache {
Evas_Object *obj;
Eina_Bool used;
@ -1027,7 +1029,7 @@ _item_create(Evas_Object *parent)
static void
_item_cache_init(Ui *ui)
{
for (int i = 0; i < 100; i++)
for (int i = 0; i < ITEM_CACHE_INIT_SIZE; i++)
{
Item_Cache *it = calloc(1, sizeof(Item_Cache));
it->obj = _item_create(ui->genlist_procs);