]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Performance: cache character widths returned from Pango.
authorSimon Tatham <anakin@pobox.com>
Sun, 23 Aug 2015 13:13:30 +0000 (14:13 +0100)
committerSimon Tatham <anakin@pobox.com>
Sun, 23 Aug 2015 13:16:18 +0000 (14:16 +0100)
commitc3ef30c883e3657ff57679fb611f1f6ee6f33dba
tree622aed836c8727185d3752040d0b6c6a21148f11
parent87040f6fd2d6913fbf1d48cdc9dd4ed7accc631b
Performance: cache character widths returned from Pango.

Profiling reveals that pterm in Pango rendering mode uses an absurd
amount of CPU when it's not even actually _drawing_ the text, because
of all the calls to pango_layout_get_pixel_extents() while
pangofont_draw_text tries to work out which characters it can safely
draw as part of a long string. Caching the results speeds things up
greatly.
unix/gtkfont.c