]> 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>
Sat, 17 Oct 2015 16:30:17 +0000 (17:30 +0100)
commit14464764da5d86934169d17188534fbdc5fd4b5b
tree53b779fc018c02811d3ed711948776205cc8bc11
parent0eb3bf07fc3f89a7cec499f1730f48fa89a7d37f
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.

(cherry picked from commit c3ef30c883e3657ff57679fb611f1f6ee6f33dba)
unix/gtkfont.c