From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?SmFuIERqw6Rydg==?= Newsgroups: gmane.emacs.devel Subject: Re: Emacs and Gnome Canvas Date: Thu, 15 Jul 2010 16:24:27 +0200 Message-ID: <4C3F1A1B.1040106@swipnet.se> References: <4C3CD120.4040905@swipnet.se> <5A91499A-0470-43FD-9F48-560CEAD3424C@mit.edu> <83wrsyr068.fsf@gnu.org> <83iq4hhjww.fsf@gnu.org> <87sk3lbvv0.fsf@telefonica.net> <83hbk1grnq.fsf@gnu.org> <4C3EBCDC.8050709@swipnet.se> <83d3upgmwj.fsf@gnu.org> <4C3ECB4C.6050208@swipnet.se> <83aaptgly1.fsf@gnu.org> <4C3ED4F9.4080603@swipnet.se> <83630hgi0r.fsf@gnu.org> <4C3EE8D6.3020607@swipnet.se> <8339vlgcax.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1279204716 499 80.91.229.12 (15 Jul 2010 14:38:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 15 Jul 2010 14:38:36 +0000 (UTC) Cc: ofv@wanadoo.es, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 15 16:38:35 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 1OZPZz-0002OH-DC for ged-emacs-devel@m.gmane.org; Thu, 15 Jul 2010 16:38:27 +0200 Original-Received: from localhost ([127.0.0.1]:56914 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OZPMf-0000qS-Tk for ged-emacs-devel@m.gmane.org; Thu, 15 Jul 2010 10:24:41 -0400 Original-Received: from [140.186.70.92] (port=55483 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OZPMY-0000pH-Fx for emacs-devel@gnu.org; Thu, 15 Jul 2010 10:24:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OZPMX-00038B-5f for emacs-devel@gnu.org; Thu, 15 Jul 2010 10:24:34 -0400 Original-Received: from smtprelay-h31.telenor.se ([213.150.131.4]:36559) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZPMU-00036T-W1; Thu, 15 Jul 2010 10:24:31 -0400 Original-Received: from ipb1.telenor.se (ipb1.telenor.se [195.54.127.164]) by smtprelay-h31.telenor.se (Postfix) with ESMTP id 7A677E9DE0; Thu, 15 Jul 2010 16:24:29 +0200 (CEST) X-SENDER-IP: [85.225.45.35] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtY8AGa2PkxV4S0jPGdsb2JhbACDH4RSl3cMAQEBATUtrGWRV4EpgwlyBA X-IronPort-AV: E=Sophos;i="4.55,208,1278280800"; d="scan'208";a="105792574" Original-Received: from c-232de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.35]) by ipb1.telenor.se with ESMTP; 15 Jul 2010 16:24:29 +0200 Original-Received: from [172.20.199.13] (zeplin [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id 6F5667FA05A; Thu, 15 Jul 2010 16:24:28 +0200 (CEST) User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; sv-SE; rv:1.9.2.4) Gecko/20100608 Thunderbird/3.1 In-Reply-To: <8339vlgcax.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:127355 Archived-At: Eli Zaretskii skrev 2010-07-15 14.27: > > Inserting one character moves all the attributes after it by one > character position, doesn't it? > Yes, but that is something the Canvas can do by itself. >> You wouldn't have to do redisplay all the time just in case >> something changed (like now) > > ?? We don't _do_ redisplay now all the time. We _enter_ redisplay > every time Emacs is idle, but if nothing's changed, we exit it almost > immediately, after testing a bunch of flags. > That is the same thing to me. With the Canvas design, you would not need to check, once it is done Canvas does all repainting as needed. >> if you propagated the change the whole way when it happened. This >> is a big difference on how Emacs works now. > > The way it looks, parts of the current redisplay code will have to run > whenever there's a change, any change, to some buffer or some related > data structure. If the parts affected by these changes are not > displayed, or become not displayed before the GTK+ idle handlers run, > propagating those changes would be a waste of CPU cycles. No, they need to be done anyway sometime, it is no waste. If the text isn't displayed, the attributes are nvertheless set up correctly for the time when the text is to be displayed later (by scrolling for example). The Canvas just have to scroll things in view and the display is up to date. If they never come into view, then there is a waste of CPU cycles. Now in Emacs you postpone the update until it is in view. With the canvas you would do the update at once, but you then don't have to bother with it anymore, for example if it comes in to view later. It should be about the same CPU-cycles, just distributed differently. > > So you win some and you lose some. Not sure about the balance. > Basically, scrolling should be very fast (assuming it is done entirely > on the Canvas side), but I'm not sure if everything else won't be > significantly slower. > If done right, I don't think it would be slower. But someone has to do the code before we know. Jan D.