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: Performance Date: Mon, 07 Jun 2010 09:35:04 -0400 Message-ID: References: Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1275917715 24656 80.91.229.12 (7 Jun 2010 13:35:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 7 Jun 2010 13:35:15 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 07 15:35:14 2010 connect(): No such file or directory 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 1OLcTy-0004mV-0M for ged-emacs-devel@m.gmane.org; Mon, 07 Jun 2010 15:35:14 +0200 Original-Received: from localhost ([127.0.0.1]:39192 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLcTx-0006xh-Bq for ged-emacs-devel@m.gmane.org; Mon, 07 Jun 2010 09:35:13 -0400 Original-Received: from [199.232.76.173] (port=59183 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLcTr-0006wz-9O for emacs-devel@gnu.org; Mon, 07 Jun 2010 09:35:07 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1OLcTo-0002cO-PQ for emacs-devel@gnu.org; Mon, 07 Jun 2010 09:35:06 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:50125) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1OLcTo-0002cK-IK for emacs-devel@gnu.org; Mon, 07 Jun 2010 09:35:04 -0400 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1OLcTo-0004mT-12; Mon, 07 Jun 2010 09:35:04 -0400 In-reply-to: (message from Stefan Monnier on Sun, 06 Jun 2010 21:05:54 -0400) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:125575 Archived-At: > From: Stefan Monnier > Date: Sun, 06 Jun 2010 21:05:54 -0400 > > It seems that functionality-wise, the bidi code is almost as good as it > was before bidi. Thanks for testing it. > But performancewise, I experience some problems. > I recently started to compile without -DENABLE_CHECKING and other such > debugging code (tho still with -O0 and -g) and am seeing cases where > cursor motion is slow. The problem is most notable in operations such > as C-e or C-n/C-p (tho those tend to be fast enough as long as I'm in > column 0). > Redisplay itself also seems to be noticeable slower at times. I'm a bit surprised, because my main machine is 5 years old, and I don't see any noticeable slowdown. But then I almost never have 10 frames (let alone more) open at the same time; usually all but 2 are minimized or iconified. > This usually shows up after I open a few different buffers&frames (like > when I have 10 frames or more (each one showing a single file), where > most frames are sized 80x89). I will try that (when I'm back from traveling in a few days). Granted, I didn't yet get to profiling and optimizing the code, because (a) so many features need yet to get right before I get them fast, and (b) the current code works reasonably fast for me, even when I compile with -O0 and even in a buffer with text that really needs reordering (which I understand is not your case). >From what you tell, it sounds like vertical cursor motion is the problem; please try C-f and C-b (_not_ the arrow keys!) and tell if they are reasonably fast or also slow. Even if C-f and C-b are fast, I don't immediately see any special reasons for slowdown with vertical motion, in a buffer with text that doesn't need reordering, except the code in bidi.c. One way of testing this hypothesis would be to replace the code in bidi.c with incrementing it->charpos and it->bytepos, like the unidirectional iteration does. Also, what kind of files are those? If it's human-readable text (not program sources or some such), are paragraphs in it long or short? Do you see any change in performance if you set bidi-paragraph-direction to `left-to-right'? Anyway, I'd love some help in this matter. Getting the bidi code faster is not a trivial job, but it does not require any knowledge of bidirectional scripts, and I can help with understanding what the code does and why. Without someone stepping forward, I doubt that I could get to seriously working on speeding up the code, what with merely 10 hours a week I have to work on Emacs.