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: Long lines and bidi Date: Fri, 08 Feb 2013 18:52:06 +0200 Message-ID: <83y5ey7npl.fsf@gnu.org> References: <877gmp5a04.fsf@ed.ac.uk> <83vca89izh.fsf@gnu.org> <5110906D.7020406@yandex.ru> <83fw1aac3d.fsf@gnu.org> <51120360.4060104@yandex.ru> <51127363.5030203@yandex.ru> <834nhp9u9j.fsf@gnu.org> <5114FEBB.8020201@yandex.ru> <838v6y99wk.fsf@gnu.org> <836222983u.fsf@gnu.org> <51152A00.6070101@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1360342331 10661 80.91.229.3 (8 Feb 2013 16:52:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Feb 2013 16:52:11 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 08 17:52:32 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U3rBg-0001aT-93 for ged-emacs-devel@m.gmane.org; Fri, 08 Feb 2013 17:52:32 +0100 Original-Received: from localhost ([::1]:47703 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3rBN-0002DS-FA for ged-emacs-devel@m.gmane.org; Fri, 08 Feb 2013 11:52:13 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:43455) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3rBK-0002CZ-08 for emacs-devel@gnu.org; Fri, 08 Feb 2013 11:52:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U3rBI-00018k-PT for emacs-devel@gnu.org; Fri, 08 Feb 2013 11:52:09 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:44013) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3rBI-00018P-Ho for emacs-devel@gnu.org; Fri, 08 Feb 2013 11:52:08 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MHW00M00UTQHC00@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Fri, 08 Feb 2013 18:52:06 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MHW00MUZUUUDL60@a-mtaout22.012.net.il>; Fri, 08 Feb 2013 18:52:06 +0200 (IST) In-reply-to: <51152A00.6070101@yandex.ru> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.172 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:156897 Archived-At: > Date: Fri, 08 Feb 2013 20:38:24 +0400 > From: Dmitry Antipov > CC: emacs-devel@gnu.org > > On 02/08/2013 06:46 PM, Eli Zaretskii wrote: > > > Btw, if you are serious about finding a solution to the long-line > > display misfeature (or any other too-slow redisplay situation), I > > generally find it necessary to do precision timing of the suspicious > > parts of code, because otherwise it is impossible to find the actual > > culprits. On GNU/Linux, I use the following simple function: > > Ah, please, there is a difference between 2013 and 1980. Sorry, you lost me here. > 1) perf record -e stalled-cycles-frontend -e stalled-cycles-backend -F 10000 [workload] > 2) perf report --stdio ==> > > 25.18% emacs emacs [.] scan_buffer > 7.04% emacs emacs [.] bidi_resolve_weak That's why testing redisplay on buffers which are predominantly punctuation will give you unrealistic measurements. (If you want to understand why, read UAX#9.) > So, ~90% of time spent in scan_buffer is: > > 799 while (*cursor != target && --cursor >= ceiling_addr) > 800 ; Which cannot be optimized.