/* Do not compare the values of bufpos and endpos. They do not
affect the display characteristics. */
+ /* Note: (hanoi 6) spends 95% of its time in redisplay, and about
+ 30% here. Not using bitfields for rune.type alone gives a redisplay
+ speed up of 10%.
+
+ #### In profile arcs run of a normal Gnus session this function
+ is run 6.76 million times, only to return 1 in 6.73 million of
+ those.
+
+ In addition a quick look GCC sparc assembly shows that GCC is not
+ doing a good job here.
+ 1. The function is not inlined (too complicated?)
+ 2. It seems to be reloading the crb and drb variables all the
+ time.
+ 3. It doesn't seem to notice that the second half of these if's
+ are really a switch statement.
+
+ So I (JV) conjecture
+
+ #### It would really be worth it to arrange for this function to
+ be (almost) a single call to memcmp. */
+
if ((crb->findex != drb->findex) ||
(WINDOW_FACE_CACHEL_DIRTY (w, drb->findex)))
return 0;
/* We bogusly don't take f->extents_changed and f->glyphs_changed
into account. This is because if we do we always redisplay the
entire layout. So far I have seen no ill effects to we'll see. */
- int frame_changed = (f->buffers_changed ||
- f->clip_changed ||
- f->faces_changed ||
- f->frame_changed ||
- f->modeline_changed ||
- f->subwindows_changed ||
- f->windows_changed ||
- f->windows_structure_changed);
+ int frame_really_changed = (f->buffers_changed ||
+ f->clip_changed ||
+ f->faces_changed ||
+ f->frame_changed ||
+ f->modeline_changed ||
+ f->subwindows_changed ||
+ f->windows_changed ||
+ f->windows_structure_changed);
XSETWINDOW (window, w);
/* Highly dodgy optimization. We want to only output the whole
layout if we really have to. */
- if (frame_changed || IMAGE_INSTANCE_DIRTYP (p))
+ if (frame_really_changed || IMAGE_INSTANCE_DIRTYP (p))
{
/* First clear the area we are drawing into. This is the easiest
thing to do since we have many gaps that we have to make sure are
generalisation.*/
if (redisplay_normalize_glyph_area (&cdb, &cdga)
&&
- (frame_changed || IMAGE_INSTANCE_DIRTYP (childii)))
+ (frame_really_changed || IMAGE_INSTANCE_DIRTYP (childii)))
{
struct display_line dl; /* this is fake */
Lisp_Object string =
case IMAGE_MONO_PIXMAP:
case IMAGE_COLOR_PIXMAP:
- if (frame_changed || IMAGE_INSTANCE_DIRTYP (childii))
+ if (frame_really_changed || IMAGE_INSTANCE_DIRTYP (childii))
redisplay_output_pixmap (w, child, &cdb, &cdga, findex,
0, 0, 0, 0);
break;
case IMAGE_WIDGET:
case IMAGE_SUBWINDOW:
- if (frame_changed || IMAGE_INSTANCE_DIRTYP (childii))
+ if (frame_really_changed || IMAGE_INSTANCE_DIRTYP (childii))
redisplay_output_subwindow (w, child, &cdb, &cdga, findex,
0, 0, 0);
break;