diff options
author | Ken Raeburn <raeburn@raeburn.org> | 2015-10-03 00:15:54 -0400 |
---|---|---|
committer | Ken Raeburn <raeburn@raeburn.org> | 2015-10-08 01:19:49 -0400 |
commit | b8eea1d7b1485a147f112127c0ca58cb1a0a8ebb (patch) | |
tree | 215730e1b1fc26ea26a37f4b454c6da138be4c28 /lisp/emacs-lisp | |
parent | 0360b7f2c4f0358106e229de4dfe91a67445a50c (diff) | |
download | emacs-b8eea1d7b1485a147f112127c0ca58cb1a0a8ebb.tar.gz emacs-b8eea1d7b1485a147f112127c0ca58cb1a0a8ebb.tar.bz2 emacs-b8eea1d7b1485a147f112127c0ca58cb1a0a8ebb.zip |
Cache XParseColor results in the X display info structure.
With repeated lookups of foreground and background colors for multiple
faces per frame, we issue a lot of redundant color name lookups to the
X server, waiting every time for the response. On a remote network
with, say, 30ms round-trip time, this can add nearly a full second to
creation of a new frame.
* src/gtkutil.c (xg_check_special_colors): Call x_parse_color.
* src/image.c (get_spec_bg_or_alpha_as_argb):
(xpm_init_color_cache, xpm_lookup_color):
* src/xfns.c (x_defined_color):
* src/xterm.c (x_parse_color): New function; caches color names not
starting with "#" in the display-info structure.
(x_delete_display): Delete the cache content.
* src/xterm.h (struct color_name_cache_entry): New type.
(x_parse_color): Declare.
(struct x_display_info): Add a new field for the cache.
Diffstat (limited to 'lisp/emacs-lisp')
0 files changed, 0 insertions, 0 deletions