From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Inefficient redisplay Date: Wed, 14 Apr 2010 21:13:48 +0300 Message-ID: <83bpdlyk9v.fsf@gnu.org> References: <83y6gsy4i0.fsf@gnu.org> <83pr24xuio.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1271268836 560 80.91.229.12 (14 Apr 2010 18:13:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 14 Apr 2010 18:13:56 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 14 20:13:54 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O2762-00065N-HU for ged-emacs-devel@m.gmane.org; Wed, 14 Apr 2010 20:13:54 +0200 Original-Received: from localhost ([127.0.0.1]:40394 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O2761-0005ZV-Ol for ged-emacs-devel@m.gmane.org; Wed, 14 Apr 2010 14:13:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O275w-0005Yf-Cu for emacs-devel@gnu.org; Wed, 14 Apr 2010 14:13:48 -0400 Original-Received: from [140.186.70.92] (port=60113 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O275u-0005XX-R2 for emacs-devel@gnu.org; Wed, 14 Apr 2010 14:13:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O275s-0004iU-Vo for emacs-devel@gnu.org; Wed, 14 Apr 2010 14:13:46 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:45734) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O275s-0004iK-LL for emacs-devel@gnu.org; Wed, 14 Apr 2010 14:13:44 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0L0V00200P9XC200@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Wed, 14 Apr 2010 21:13:42 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.127.217.38]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L0V00L0MPARX4C0@a-mtaout23.012.net.il>; Wed, 14 Apr 2010 21:13:40 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:123658 Archived-At: > From: Stefan Monnier > Date: Mon, 12 Apr 2010 17:46:21 -0400 > Cc: emacs-devel@gnu.org > > Several problems: > 1- it seems that I'm not able to have position N displayed without > having all positions 1..N with fontified set to non-nil (I.e. I have > to have all the prefix of the buffer fontified). That's a major > problem since I use overlays: if N is large, that implies a large > number of overlays, which implies serious performance problems. > 2- performance sucks. Maybe it's because of 1, but it's probably not > only due to that, because performance is better when I go back to the > beginning of the buffer (which doesn't remove overlays). I don't think the amount of overlays is the reason for 2. My evidence is that if I invoke nhexl-flush-overlays manually, performance does not improve a bit. I started looking at what nhexl-mode does, and I'm puzzled by the logic of its design. Why do you arrange for nhexl-jit to be called via fontification-functions, if you also have it on post-command-hook? Is one of them a remnant of an idea that was rejected? if so, which one? If you really do need both, can you explain why? If invoking nhexl-jit via fontification-functions is really needed, then where do you expect redisplay to invoke it? IOW, if you make assumptions regarding the value of START and END arguments passed to nhexl-jit by redisplay, what are those assumptions? > The behavior I see seems consistent with a situation where the redisplay > "doesn't see" the newlines in the before-strings I don't see any sign that redisplay "doesn't see" the newlines. The mere fact that you see several lines on the screen is the proof that redisplay did see the newlines: that's how it knows that one line ends and another begins. I think performance "sucks" for a different reason, but I don't yet know what it is.