unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* redundant redisplay
@ 2004-04-27 17:57 Tak Ota
  2004-04-27 20:56 ` David Kastrup
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Tak Ota @ 2004-04-27 17:57 UTC (permalink / raw)


Some recent change, which I cannot identify, affects the redisplay
mechanism so that set-buffer-modified-p redisplays window contents
redundantly.  It creates occasional annoying partial screen flashing
as well as considerably slows down a buffer process which updates
modeline frequently.

-Tak

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: redundant redisplay
  2004-04-27 17:57 redundant redisplay Tak Ota
@ 2004-04-27 20:56 ` David Kastrup
  2004-04-28  1:37   ` Kim F. Storm
  2004-04-27 22:40 ` Miles Bader
  2004-04-28 23:06 ` Kim F. Storm
  2 siblings, 1 reply; 7+ messages in thread
From: David Kastrup @ 2004-04-27 20:56 UTC (permalink / raw)
  Cc: emacs-devel

Tak Ota <Takaaki.Ota@am.sony.com> writes:

> Some recent change, which I cannot identify, affects the redisplay
> mechanism so that set-buffer-modified-p redisplays window contents
> redundantly.  It creates occasional annoying partial screen flashing
> as well as considerably slows down a buffer process which updates
> modeline frequently.

>From the Elisp manual:

 - Function: set-buffer-modified-p flag
     This function marks the current buffer as modified if FLAG is
     non-`nil', or as unmodified if the flag is `nil'.

     Another effect of calling this function is to cause unconditional
     redisplay of the mode line for the current buffer.  In fact, the
     function `force-mode-line-update' works by doing this:

          (set-buffer-modified-p (buffer-modified-p))

So it _should_ cause a redisplay, but only of the buffer line.  Kim,
are you taking a peek at the line height there, could that be it?

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: redundant redisplay
  2004-04-27 17:57 redundant redisplay Tak Ota
  2004-04-27 20:56 ` David Kastrup
@ 2004-04-27 22:40 ` Miles Bader
  2004-04-28 23:06 ` Kim F. Storm
  2 siblings, 0 replies; 7+ messages in thread
From: Miles Bader @ 2004-04-27 22:40 UTC (permalink / raw)
  Cc: emacs-devel

On Tue, Apr 27, 2004 at 10:57:38AM -0700, Tak Ota wrote:
> Some recent change, which I cannot identify, affects the redisplay
> mechanism so that set-buffer-modified-p redisplays window contents
> redundantly.  It creates occasional annoying partial screen flashing
> as well as considerably slows down a buffer process which updates
> modeline frequently.

Hmmm, I've noticed that recent version of emacs have started flickering like
crazy in some circumstances, but haven't had much time to debug it.[*]

I mostly see this in Gnus *Summary ...* buffers: the whole (summary) window
will suddenly start flickering, and it seems that it's redrawing the entire
window constantly.

I don't know if this is connected with set-buffer-modified-p or not though.

[*] Insert my usual disclaimer that I use a fairly hacked emacs, and haven't
    tested whether this behavior occurs in vanilla emacs or not.

Thanks,

-Miles
-- 
In New York, most people don't have cars, so if you want to kill a person, you
have to take the subway to their house.  And sometimes on the way, the train
is delayed and you get impatient, so you have to kill someone on the subway.
  [George Carlin]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: redundant redisplay
  2004-04-27 20:56 ` David Kastrup
@ 2004-04-28  1:37   ` Kim F. Storm
  0 siblings, 0 replies; 7+ messages in thread
From: Kim F. Storm @ 2004-04-28  1:37 UTC (permalink / raw)
  Cc: Tak Ota, emacs-devel

David Kastrup <dak@gnu.org> writes:

> Tak Ota <Takaaki.Ota@am.sony.com> writes:
> 
> > Some recent change, which I cannot identify, affects the redisplay
> > mechanism so that set-buffer-modified-p redisplays window contents
> > redundantly.  It creates occasional annoying partial screen flashing
> > as well as considerably slows down a buffer process which updates
> > modeline frequently.
> 
> >From the Elisp manual:
> 
>  - Function: set-buffer-modified-p flag
>      This function marks the current buffer as modified if FLAG is
>      non-`nil', or as unmodified if the flag is `nil'.
> 
>      Another effect of calling this function is to cause unconditional
>      redisplay of the mode line for the current buffer.  In fact, the
>      function `force-mode-line-update' works by doing this:
> 
>           (set-buffer-modified-p (buffer-modified-p))
> 
> So it _should_ cause a redisplay, but only of the buffer line.  Kim,
> are you taking a peek at the line height there, could that be it?

It could be related to my changes of 2004-04-21 (I have a build from
04-18 where it doesn't seem to occur)  I just cannot see which change
could cause this.

I can provoke this myself with something like this:

M-x gdb
start another emacs,
C-x 2 (to get two windows)
r -Q
Then move the new emacs frame to overlap the one running gdb.
Now move the cursor (wildly) in the new emacs window and see
the modeline in the old emacs frame flicker.

I tried to trace this a bit, and one thing I saw is that gdb receives
a zillion of frames-invalid messages (here is a dump of the buffer
read from gdb pipe):

\n\032\032frames-invalid\n\n\032\032frames-invalid\n\n\032\032frames-invalid\n\n\032\032frames-invalid\n\n\032\032frames-invalid\n\n\032\032frames-invalid\n\n\032\032frames-invalid\n\n\032\032frames-invalid\n\n\032\032frames-invalid\n\n\032\032frames-invali

Maybe my change did something which causes this to redisplay more
frequently or radically.  I'll investigate further tomorrow...

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: redundant redisplay
  2004-04-27 17:57 redundant redisplay Tak Ota
  2004-04-27 20:56 ` David Kastrup
  2004-04-27 22:40 ` Miles Bader
@ 2004-04-28 23:06 ` Kim F. Storm
  2004-04-28 23:23   ` Miles Bader
  2004-04-29  7:35   ` Tak Ota
  2 siblings, 2 replies; 7+ messages in thread
From: Kim F. Storm @ 2004-04-28 23:06 UTC (permalink / raw)
  Cc: emacs-devel

Tak Ota <Takaaki.Ota@am.sony.com> writes:

> Some recent change, which I cannot identify, affects the redisplay
> mechanism so that set-buffer-modified-p redisplays window contents
> redundantly.  It creates occasional annoying partial screen flashing
> as well as considerably slows down a buffer process which updates
> modeline frequently.

I found a problem with the image slicing patch (missing initialization
of slice info for non-image glyphs), which could very well cause
unnecessary redisplay.

I have just installed a fix, please see if it helps.

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: redundant redisplay
  2004-04-28 23:06 ` Kim F. Storm
@ 2004-04-28 23:23   ` Miles Bader
  2004-04-29  7:35   ` Tak Ota
  1 sibling, 0 replies; 7+ messages in thread
From: Miles Bader @ 2004-04-28 23:23 UTC (permalink / raw)
  Cc: Tak Ota, emacs-devel

On Thu, Apr 29, 2004 at 01:06:11AM +0200, Kim F. Storm wrote:
> I found a problem with the image slicing patch (missing initialization
> of slice info for non-image glyphs), which could very well cause
> unnecessary redisplay.
> 
> I have just installed a fix, please see if it helps.

Thanks Kim; that seems to have fixed the obvious flickering I was seeing,
anyway.  [Knock on wood...]

-Miles
-- 
Next to fried food, the South has suffered most from oratory.
  			-- Walter Hines Page

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: redundant redisplay
  2004-04-28 23:06 ` Kim F. Storm
  2004-04-28 23:23   ` Miles Bader
@ 2004-04-29  7:35   ` Tak Ota
  1 sibling, 0 replies; 7+ messages in thread
From: Tak Ota @ 2004-04-29  7:35 UTC (permalink / raw)
  Cc: emacs-devel

29 Apr 2004 01:06:11 +0200: no-spam@cua.dk (Kim F. Storm) wrote:

> Tak Ota <Takaaki.Ota@am.sony.com> writes:
> 
> > Some recent change, which I cannot identify, affects the redisplay
> > mechanism so that set-buffer-modified-p redisplays window contents
> > redundantly.  It creates occasional annoying partial screen flashing
> > as well as considerably slows down a buffer process which updates
> > modeline frequently.
> 
> I found a problem with the image slicing patch (missing initialization
> of slice info for non-image glyphs), which could very well cause
> unnecessary redisplay.
> 
> I have just installed a fix, please see if it helps.

2004-04-29  Kim F. Storm  <storm@cua.dk>

	* xdisp.c (null_glyph_slice): New var.
	(append_glyph, append_composite_glyph, append_stretch_glyph):
	Use it to initialize glyph slice.

Yes, this does eliminate the redundant redisplay problem.  Thank you.

-Tak

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-04-29  7:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-27 17:57 redundant redisplay Tak Ota
2004-04-27 20:56 ` David Kastrup
2004-04-28  1:37   ` Kim F. Storm
2004-04-27 22:40 ` Miles Bader
2004-04-28 23:06 ` Kim F. Storm
2004-04-28 23:23   ` Miles Bader
2004-04-29  7:35   ` Tak Ota

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).