Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Chart::Clicker makes way too many set-font-options and select-font-face calls #51

Open
jamesbriggs opened this issue Jan 13, 2017 · 0 comments

Comments

@jamesbriggs
Copy link

jamesbriggs commented Jan 13, 2017

Hi Cory.

Chart::Clicker would render twice as fast without the excessive (4x expected) number of set-font-options and select-font-face calls, as listed by cairo-trace on CentOS 7.

There appears to be:

  1. font calls on every object draw, text-related or not
  2. plus font setting for every value element specified in arrays
  3. plus unexpected calls with the default Sans font (I requested only Arial)
# yum install cairo-tools
# CAIRO_TRACE_LINE_INFO=1 cairo-trace perl graph.cgi

%!CairoScript - perl
dict
  /width 500 set
  /height 250 set
  /format //ARGB32 set
  /content //COLOR_ALPHA set
  image dup /s0 exch def
context % c0
n << >> set-font-options
(Sans) //SLANT_NORMAL //WEIGHT_NORMAL select-font-face
12 set-font-size
n << >> set-font-options
(Sans) //SLANT_NORMAL //WEIGHT_NORMAL select-font-face
12 set-font-size
n << >> set-font-options
n << >> set-font-options
n << >> set-font-options
(Sans) //SLANT_NORMAL //WEIGHT_NORMAL select-font-face
12 set-font-size
n << >> set-font-options
(Sans) //SLANT_NORMAL //WEIGHT_NORMAL select-font-face
[.. deleted 1,000 more lines, mostly font calls ..]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant