unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
To: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Cc: emacs-devel@gnu.org
Subject: Re: Display performance degradation
Date: Mon, 21 Dec 2009 10:17:46 +0900	[thread overview]
Message-ID: <tl7r5qpceh1.fsf@m17n.org> (raw)
In-Reply-To: <wlljgzwu1c.wl%mituharu@math.s.chiba-u.ac.jp> (message from YAMAMOTO Mitsuharu on Sat, 19 Dec 2009 11:56:47 +0900)

In article <wlljgzwu1c.wl%mituharu@math.s.chiba-u.ac.jp>, YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> writes:

> While I was looking at font caching code, I found a part that seems to
> be wrong, though it is not directly related to the original
> performance issue.

> Fclear_font_cache (in src/font.c):

>   4484		    val = XCDR (cache);
>   4485		    while (! NILP (val)
>   4486			   && ! EQ (XCAR (XCAR (val)), driver_list->driver->type))
>   4487		      val = XCDR (val);
>   4488		    font_assert (! NILP (val));
>   4489		    val = XCDR (XCAR (val));
>   4490		    if (XINT (XCAR (val)) == 0)
>   4491		      {
>   4492			font_clear_cache (f, XCAR (val), driver_list->driver);
>   4493			XSETCDR (cache, XCDR (val));
>   4494		      }
>   4495		  }

> At line 4490, XCAR (val) is expected to be of type Lisp integer.  But
> it is also passed to font_clear_cache at line 4492, which seems to
> expect the value of `val' as of line 4488 rather than the one assigned
> at line 4489.

Oops, Fclear_font_cache is a funciton I made for debugging,
but I have forgotten to put it within #ifdef FONT_DEBUG
... #endif, and also forgotten to adjsut it for the other
changes.

In article <m2eimrjnaf.fsf@igel.home>, Andreas Schwab <schwab@linux-m68k.org> writes:
> If the condition is ever true then Emacs crashes.  I've checked in a
> fix.

Thank you!

> But then, I don't think this function is ever more than a no-op
> anyway, since as soon as NUM-FRAMES becomes zero the cache is cleared
> automatically anyway.

Right, so it exists just for debugging.  But, I've just
found that the new file font-setting.el calls it now.  Ummm,
I'm not sure it works while a frame is alive.  I'll check
the code again.

---
Kenichi Handa
handa@m17n.org




  parent reply	other threads:[~2009-12-21  1:17 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-17  2:49 Display performance degradation YAMAMOTO Mitsuharu
2009-12-17  7:39 ` Jan D.
2009-12-17 20:08   ` Eli Zaretskii
2009-12-18 16:47     ` Jan Djärv
2009-12-18 21:20       ` Eli Zaretskii
2010-01-02 11:05         ` Jan Djärv
2010-01-02 11:21           ` Eli Zaretskii
2010-01-02 14:31             ` Jan Djärv
2009-12-17 12:24 ` Kenichi Handa
2009-12-17 14:43   ` Chong Yidong
2009-12-18  3:53     ` Miles Bader
2009-12-17 16:42   ` Jan Djärv
2009-12-18  3:06     ` YAMAMOTO Mitsuharu
2009-12-18  5:46     ` Kenichi Handa
2009-12-19  2:56       ` YAMAMOTO Mitsuharu
2009-12-19 10:00         ` Andreas Schwab
2009-12-20  6:27           ` YAMAMOTO Mitsuharu
2009-12-21  1:17         ` Kenichi Handa [this message]
2009-12-21  2:11           ` Miles Bader
2009-12-21  2:31             ` Lennart Borgman
2009-12-21  3:05               ` Miles Bader
2009-12-21  3:08                 ` Lennart Borgman
2009-12-21  3:44                   ` Miles Bader
2009-12-21  3:54                     ` Lennart Borgman
2009-12-21  4:16                       ` Miles Bader
2009-12-21  4:18                         ` Lennart Borgman
2010-01-06 19:46 ` Jan Djärv
2010-01-07  8:26   ` YAMAMOTO Mitsuharu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tl7r5qpceh1.fsf@m17n.org \
    --to=handa@m17n.org \
    --cc=emacs-devel@gnu.org \
    --cc=mituharu@math.s.chiba-u.ac.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).