evas/cserve2: Small performance fixes
authorJean-Philippe Andre <jp.andre@samsung.com>
Tue, 27 Aug 2013 06:35:22 +0000 (15:35 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Mon, 28 Oct 2013 06:47:14 +0000 (15:47 +0900)
src/bin/evas/evas_cserve2_index.c
src/bin/evas/evas_cserve2_slaves.c
src/lib/evas/cserve2/evas_cs2_client.c

index 2c4d9dc..ce5b93a 100644 (file)
@@ -550,11 +550,15 @@ _shared_index_entry_get_by_id(Shared_Index *si, unsigned int id)
         obj = (Index_Entry *) (base + (elemsize * id));
         if (obj->id == id)
           return obj;
+        if (obj->id < id)
+          low = id + 1;
+        else
+          high = id;
      }
 
    // Binary search
    start_high = high;
-   while(high != low)
+   while(high > low)
      {
         cur = low + ((high - low) / 2);
         obj = (Index_Entry *) (base + (elemsize * cur));
index 3bbf39d..a1fc7f5 100644 (file)
@@ -128,7 +128,7 @@ _slave_proc_dead_cb(int pid, int status EINA_UNUSED)
 {
    Slave_Proc *s;
 
-   DBG("Child dead with pid '%d'.", pid);
+   INF("Child dead with pid '%d'.", pid);
    s = _slave_proc_find(pid);
    if (!s)
      {
index 4a00521..01bd8b7 100644 (file)
@@ -1447,13 +1447,15 @@ _font_entry_glyph_map_rebuild_check(Font_Entry *fe, Font_Hint_Flags hints)
                    fe->map->mempool.data + gl->offset;
              gl->base.bitmap.num_grays = gd->num_grays;
              gl->base.bitmap.pixel_mode = gd->pixel_mode;
+             gl->idx = gd->index;
              gl->rid = 0;
 
              eina_clist_add_head(&fe->map->glyphs, &gl->map_entry);
              fash_gl_add(fe->fash[hints], gd->index, gl);
              cnt++;
           }
-        DBG("Added %d glyphs to the font hash (out of %d scanned)", cnt, tot);
+        if (cnt)
+          DBG("Added %d glyphs to the font hash (out of %d scanned)", cnt, tot);
      }
 
    return cnt;