Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas
Dir : e17/libs/evas/src/lib/engines/common Modified Files: evas_array_hash.c evas_font_draw.c evas_image_main.c Log Message: fix the cache code - it was basically broken and wouldnt free things from cache. it also didnt account cache USAGE (cache is ref == 0 count images speculatively hanging around in case theyare needed). =================================================================== RCS file: /cvs/e/e17/libs/evas/src/lib/engines/common/evas_array_hash.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- evas_array_hash.c 22 Apr 2006 11:08:01 -0000 1.1 +++ evas_array_hash.c 8 Aug 2007 23:41:31 -0000 1.2 @@ -63,14 +63,14 @@ if (!el) { el = malloc(sizeof(Evas_Array_Hash_El)); - el->data_max = 1 << 5; + el->data_max = 4; el->data = malloc(sizeof(int) * el->data_max); el->data_count = 0; hash->buckets[hash_val] = el; } else if (el->data_count == el->data_max) { - el->data_max = el->data_max << 1; + el->data_max = el->data_max *= 2; el->data = realloc(el->data, sizeof(int) * el->data_max); } =================================================================== RCS file: /cvs/e/e17/libs/evas/src/lib/engines/common/evas_font_draw.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -3 -r1.31 -r1.32 --- evas_font_draw.c 15 Nov 2006 16:44:34 -0000 1.31 +++ evas_font_draw.c 8 Aug 2007 23:41:31 -0000 1.32 @@ -84,7 +84,7 @@ { if (evas_common_font_source_load_complete(fi->src)) return 0; - +#if 0 /* FIXME: disable this. this can eat a LOT of memory and in my tests with expedite at any rate shows no visible improvements */ index = FT_Get_Char_Index(fi->src->ft.face, gl); if (index == 0) { @@ -93,11 +93,11 @@ FT_UInt gindex; fi->src->charmap = evas_common_array_hash_new(); - charcode = FT_Get_First_Char(fi->src->ft.face, &gindex ); - while ( gindex != 0 ) + charcode = FT_Get_First_Char(fi->src->ft.face, &gindex); + while (gindex != 0) { evas_common_array_hash_add(fi->src->charmap, charcode, gindex); - charcode = FT_Get_Next_Char(fi->src->ft.face, charcode, &gindex ); + charcode = FT_Get_Next_Char(fi->src->ft.face, charcode, &gindex); } /* Free face */ @@ -111,6 +111,7 @@ *fi_ret = fi; return index; } +#endif } else /* Charmap not loaded, FS loaded */ { =================================================================== RCS file: /cvs/e/e17/libs/evas/src/lib/engines/common/evas_image_main.c,v retrieving revision 1.54 retrieving revision 1.55 diff -u -3 -r1.54 -r1.55 --- evas_image_main.c 22 Jul 2007 16:25:24 -0000 1.54 +++ evas_image_main.c 8 Aug 2007 23:41:31 -0000 1.55 @@ -380,10 +380,10 @@ { int ram = 0; - ram += sizeof(struct _RGBA_Image); - if (im->info.file) ram += strlen(im->info.file); +// ram += sizeof(struct _RGBA_Image); +// if (im->info.file) ram += strlen(im->info.file); // if (im->info.real_file) ram += strlen(im->info.real_file); - if (im->info.key) ram += strlen(im->info.key); +// if (im->info.key) ram += strlen(im->info.key); // if (im->info.comment) ram += strlen(im->info.comment); if ((im->image) && (im->image->data) && (!im->image->no_free)) ram += im->image->w * im->image->h * sizeof(DATA32); ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs