GNOME Bugzilla – Bug 485566
Cache one OpenType Buffer
Last modified: 2007-10-12 07:42:04 UTC
Can be done transparently in pango_ot_buffer_new/destroy(), like we do for renderer. Also asked for here: http://www.gnome.org/~federico/news-2007-10.html#10
*** Bug 485564 has been marked as a duplicate of this bug. ***
*** Bug 485562 has been marked as a duplicate of this bug. ***
Decided to cache a HB_Buffer. That was simpler and cleaner.
2007-10-11 Behdad Esfahbod <behdad@gnome.org> Bug 485566 – Cache one OpenType Buffer * pango/pango-ot-buffer.c (acquire_buffer), (release_buffer), (pango_ot_buffer_new), (pango_ot_buffer_destroy): * pango/pango-ot-private.h: Cache one HB_Buffer that is acquired using a lock. A new one is created if the shared buffer is locked. The shared buffer is cleared when released. May want to make it free shared buffer if buffer->allocated is too large. Not sure.
Created attachment 97072 [details] [review] patch Federico, see if you like it.
W00t! This totally removes the buffer functions from the profile (makes them around 0.27% of the benchmark). Thanks a lot, Behdad!