From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.bugs Subject: bug#23801: 25.0.95; term.el redraws extremely slow with bidi support enabled, and large buffers Date: Tue, 21 Jun 2016 02:35:46 +1200 Message-ID: <5767FF42.10208@orcon.net.nz> References: <57666E36.6030809@orcon.net.nz> <83pord87rp.fsf@gnu.org> <0b5cd701be526f2391bb8fe15bb120c7@mail.orcon.net.nz> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1466433769 2644 80.91.229.3 (20 Jun 2016 14:42:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Jun 2016 14:42:49 +0000 (UTC) To: 23801@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 20 16:42:39 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1bF0PO-0006Ar-Pb for geb-bug-gnu-emacs@m.gmane.org; Mon, 20 Jun 2016 16:42:38 +0200 Original-Received: from localhost ([::1]:44056 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF0PO-0005ue-32 for geb-bug-gnu-emacs@m.gmane.org; Mon, 20 Jun 2016 10:42:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55316) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF0J4-0007Ut-34 for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2016 10:36:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bF0J0-0004UU-BC for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2016 10:36:04 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35473) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF0J0-0004UQ-7c for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2016 10:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bF0J0-0006GQ-3V for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2016 10:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jun 2016 14:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23801 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23801-submit@debbugs.gnu.org id=B23801.146643335924070 (code B ref 23801); Mon, 20 Jun 2016 14:36:02 +0000 Original-Received: (at 23801) by debbugs.gnu.org; 20 Jun 2016 14:35:59 +0000 Original-Received: from localhost ([127.0.0.1]:47810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bF0Iw-0006GA-UF for submit@debbugs.gnu.org; Mon, 20 Jun 2016 10:35:59 -0400 Original-Received: from [219.88.242.62] (port=38749 helo=mail.orcon.net.nz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bF0Iu-0006G0-PA for 23801@debbugs.gnu.org; Mon, 20 Jun 2016 10:35:57 -0400 Original-Received: from [192.168.20.100] (host-203-94-60-222.xdsl.kinect.net.nz [203.94.60.222] (may be forged)) (authenticated bits=0) by mail.orcon.net.nz (8.14.3/8.14.3/Debian-9.4) with ESMTP id u5KEZlxd007379; Tue, 21 Jun 2016 02:35:48 +1200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 In-Reply-To: <0b5cd701be526f2391bb8fe15bb120c7@mail.orcon.net.nz> X-Bayes-Prob: 0.0001 (Score 0: No Bayes scoring rules defined, tokens from: outbound) X-CanIt-Geo: ip=203.94.60.222; country=NZ; region=Auckland; city=Auckland; latitude=-36.8667; longitude=174.7667; http://maps.google.com/maps?q=-36.8667,174.7667&z=6 X-CanItPRO-Stream: base:outbound X-Canit-Stats-ID: 01R92zL0f - 3053bf5b6734 - 20160621 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:119831 Archived-At: Progress... I believe the terminal screen refreshes which exhibit the issue are performed by inserting spaces (with a background colour). It turns out that we can demonstrate this issue without any other programs, simply by inserting spaces (or tabs). Most critically, inserting non-whitespace characters does NOT cause performance issues! (At least not the ones I've tried.) (This presumably explains why midnight commander's initial draw was so comparatively speedy, as it was drawing the final content from the outset, rather than clearing the screen first and then writing the content.) Recipe: emacs -Q (and maximise the terminal or GUI frame) M-x term (and run a shell) printf "%10000s" x (to insert an 'x' preceded by 9,999 spaces.) That's not as obvious without a background colour, but we can provide that easily enough: printf "\033[41m%10000s\033[47m" x (Drawing in red, and reverting to a white background. Use 40m in the final sequence if you need to revert to black instead.) Bash supports numeric prefix arguments for repetition just like Emacs, so you can also insert lots of spaces like so: M-10000 SPC You can insert 1,000 TABs with: M-1000 C-v C-i With this approach we are entering (but not yet submitting) a command, and I further note that using C-u at this point to erase our input is also really slow to complete -- but again, only when it is whitespace being 'erased'. e.g. M-10000 x C-u is perfectly speedy.