After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 485566 - Cache one OpenType Buffer
Cache one OpenType Buffer
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: pango-maint
pango-maint
: 485562 485564 (view as bug list)
Depends on: 485621
Blocks:
 
 
Reported: 2007-10-11 00:29 UTC by Behdad Esfahbod
Modified: 2007-10-12 07:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (2.89 KB, patch)
2007-10-11 17:23 UTC, Behdad Esfahbod
committed Details | Review

Description Behdad Esfahbod 2007-10-11 00:29:49 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
Comment 1 Behdad Esfahbod 2007-10-11 00:34:58 UTC
*** Bug 485564 has been marked as a duplicate of this bug. ***
Comment 2 Behdad Esfahbod 2007-10-11 00:35:11 UTC
*** Bug 485562 has been marked as a duplicate of this bug. ***
Comment 3 Behdad Esfahbod 2007-10-11 17:20:16 UTC
Decided to cache a HB_Buffer.  That was simpler and cleaner.
Comment 4 Behdad Esfahbod 2007-10-11 17:22:09 UTC
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.

Comment 5 Behdad Esfahbod 2007-10-11 17:23:14 UTC
Created attachment 97072 [details] [review]
patch

Federico, see if you like it.
Comment 6 Federico Mena Quintero 2007-10-12 07:42:04 UTC
W00t!  This totally removes the buffer functions from the profile (makes them around 0.27% of the benchmark).  Thanks a lot, Behdad!