Re: Pango glyph extents patch revisited



On Wed, 23 Nov 2005, Matthias Clasen wrote:

> Generally (without looking at the patch), your approach sounds very
> reasonable to me. Did you see any size differences between the original
> (unbounded) caching and your cache ? Ie does limiting the cache size
> reduce the memory consumption ?

Did three tests, one with HELLO.utf8, one English text, one
Persian text.  Seems like memory consumption in mine is more than
head, probably because no font ever uses more than (I guess) ~100
glyphs.  Maybe we should reduce the cache size?  Here are the
figures:

HELLO:

behdad
  malloc/free: in use at exit: 2958071 bytes in 44080 blocks.
  malloc/free: 508840 allocs, 464760 frees, 55807990 bytes allocated.

head
  malloc/free: in use at exit: 2913991 bytes in 44555 blocks.
  malloc/free: 509806 allocs, 465251 frees, 55720342 bytes allocated.

vektor
  malloc/free: in use at exit: 3033655 bytes in 44283 blocks.
  malloc/free: 509246 allocs, 464963 frees, 55983638 bytes allocated.


English:

behdad
  malloc/free: in use at exit: 438293 bytes in 6331 blocks.
  malloc/free: 42919 allocs, 36588 frees, 4191933 bytes allocated.

head
  malloc/free: in use at exit: 433805 bytes in 6649 blocks.
  malloc/free: 43239 allocs, 36590 frees, 4187533 bytes allocated.

vektor
  malloc/free: in use at exit: 618245 bytes in 6443 blocks.
  malloc/free: 43031 allocs, 36588 frees, 4371885 bytes allocated.


Persian:

behdad
  malloc/free: in use at exit: 525107 bytes in 7512 blocks.
  malloc/free: 61348 allocs, 53836 frees, 8217471 bytes allocated.

head
  malloc/free: in use at exit: 514483 bytes in 8100 blocks.
  malloc/free: 61938 allocs, 53838 frees, 8206935 bytes allocated.

vektor
  malloc/free: in use at exit: 754771 bytes in 7744 blocks.
  malloc/free: 61580 allocs, 53836 frees, 8447135 bytes allocated.



Billy's is a bit different, since it doesn't malloc the 1024ptr
table, but includes it in PangoCairoFcFont.

This is with glib HEAD which has dummy g_slice.

--behdad
http://behdad.org/

"Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"
	-- Dan Bern, "New American Language"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]