simon-git: putty (master): Simon Tatham

Commits to Tartarus CVS repository. tartarus-commits at lists.tartarus.org
Sun Aug 23 14:18:02 BST 2015


TL;DR:
  87040f6 Fix an arithmetic error in the X font downloader cache.
  c3ef30c Performance: cache character widths returned from Pango.

Repository:     git://git.tartarus.org/simon/putty.git
On the web:     http://tartarus.org/~simon-git/gitweb/?p=putty.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2015-08-23 14:18:02

commit 87040f6fd2d6913fbf1d48cdc9dd4ed7accc631b
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=87040f6fd2d6913fbf1d48cdc9dd4ed7accc631b;hp=dc16dd5aa4a3fb2e367bc6303963321e628594ac
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Aug 23 14:10:59 2015 +0100

    Fix an arithmetic error in the X font downloader cache.
    
    If you're trying to arrange that an array size is large enough for
    element n to exist, and you also want to round it up to the next
    multiple of 0x100, you must set the size to (n + 0x100) & ~0xFF, and
    not (n + 0xFF) & ~0xFF. Put another way, the number you have to round
    up is not n, but the minimum size n+1 that causes array[n] to exist.

 unix/gtkfont.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit c3ef30c883e3657ff57679fb611f1f6ee6f33dba
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=c3ef30c883e3657ff57679fb611f1f6ee6f33dba;hp=87040f6fd2d6913fbf1d48cdc9dd4ed7accc631b
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Aug 23 14:13:30 2015 +0100

    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 |   96 ++++++++++++++++++++++++++++++++++++++------------------
 1 file changed, 65 insertions(+), 31 deletions(-)



More information about the tartarus-commits mailing list