diff --git a/src/bin/evas/evas_cserve2_index.c b/src/bin/evas/evas_cserve2_index.c index 699ef95064..816a686d23 100644 --- a/src/bin/evas/evas_cserve2_index.c +++ b/src/bin/evas/evas_cserve2_index.c @@ -544,6 +544,14 @@ _shared_index_entry_get_by_id(Shared_Index *si, unsigned int id) base = si->sa->ds->data + sizeof(Shared_Array_Header); elemsize = si->sa->header->elemsize; + // Direct access, works for non-repacked arrays + if ((int) id < high) + { + obj = (Index_Entry *) (base + (elemsize * id)); + if (obj->id == id) + return obj; + } + // Binary search start_high = high; while(high != low) diff --git a/src/bin/evas/evas_cserve2_shm_debug.c b/src/bin/evas/evas_cserve2_shm_debug.c index e17e5d2b40..bde62bd89b 100644 --- a/src/bin/evas/evas_cserve2_shm_debug.c +++ b/src/bin/evas/evas_cserve2_shm_debug.c @@ -286,6 +286,14 @@ _shared_index_item_get_by_id(Shm_File *si, int elemsize, unsigned int id) base = si->data + sizeof(Shared_Array_Header); + // Direct access, works for non-repacked arrays + if ((int) id < high) + { + obj = (Shm_Object *) (base + (elemsize * id)); + if (obj->id == id) + return obj; + } + // Binary search start_high = high; while(high != low) diff --git a/src/lib/evas/cserve2/evas_cs2_client.c b/src/lib/evas/cserve2/evas_cs2_client.c index 5721d0bd69..9bcf966339 100644 --- a/src/lib/evas/cserve2/evas_cs2_client.c +++ b/src/lib/evas/cserve2/evas_cs2_client.c @@ -1929,6 +1929,14 @@ _shared_index_item_get_by_id(Shared_Index *si, int elemsize, unsigned int id) base = si->data + sizeof(Shared_Array_Header); + // Direct access, works for non-repacked arrays + if ((int) id < high) + { + obj = (Shm_Object *) (base + (elemsize * id)); + if (obj->id == id) + return obj; + } + // Binary search start_high = high; while(high != low)