From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: Performance degradation from long lines Date: Thu, 25 Oct 2018 19:18:40 +0200 Message-ID: <87r2gegd1r.fsf@web.de> References: <83lg6mqdfh.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1540490115 28843 195.159.176.226 (25 Oct 2018 17:55:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 25 Oct 2018 17:55:15 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: mithraeum , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 25 19:55:10 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFjqf-0007NJ-Bf for ged-emacs-devel@m.gmane.org; Thu, 25 Oct 2018 19:55:09 +0200 Original-Received: from localhost ([::1]:56206 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFjsl-000826-RF for ged-emacs-devel@m.gmane.org; Thu, 25 Oct 2018 13:57:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40232) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFjKr-0006h0-IZ for emacs-devel@gnu.org; Thu, 25 Oct 2018 13:22:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gFjHT-0007G5-CC for emacs-devel@gnu.org; Thu, 25 Oct 2018 13:18:50 -0400 Original-Received: from mout.web.de ([212.227.17.11]:59065) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gFjHT-0007EO-21; Thu, 25 Oct 2018 13:18:47 -0400 Original-Received: from drachen.dragon ([94.218.210.177]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0M6mTI-1fLPfB3fsq-00wShx; Thu, 25 Oct 2018 19:18:42 +0200 Original-Received: from drachen.dragon ([94.218.210.177]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0M6mTI-1fLPfB3fsq-00wShx; Thu, 25 Oct 2018 19:18:42 +0200 In-Reply-To: <83lg6mqdfh.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 25 Oct 2018 18:00:18 +0300") X-Provags-ID: V03:K1:Rpp10a7ijiU1p+FepxjApH9EfcJFH44luneGIm6vSR6mf9RAPb1 16S8pqbap9nx2U9c1dC7dXp8GbgaribyH/AVeuzJtWZTCmyRzgljSDPFstxMAf9YoFRJJAh zoMG2hunASiMvogSEANqQoQeBgDwfp13qBahoWmU7sYpY1BZKJGjjJaPDkfHOphTcExapXp 8M4YGC1jiwnbVf2QJzsxA== X-UI-Out-Filterresults: notjunk:1;V01:K0:5/73N2OhsYQ=:asNq2vFeZ/eFl4naaPjoai 8oRX1pjiYePC+blNOiJhBgKsuLrdh2PJGFfU4/WPhl4TkU2asqMGhxFZCsaq+k2LNSL1d6spd gjCjKhnhwUgmFtF+VWUzPFCwKldKTt4zRR1ySBiSqtHnmAsGrjJ7OG+KalRhrHobf1qteyL/8 rPRD5QMGMZegVN+1nowWQTnAG1dmw0VhoeV4IVgQFqQ0bJMjCr+ZV0xqQIzAWUs0pS/KngUYK ARvfVhHpGZMRlIIGMf+hBD1rE+geSJf1M2UTisw4VL+IXjEbbGAKtMnz3t6u+hgbPVsgcjJKg W8n/Rk7jH/H9q67jYHq24Fk9DMbTp/jBQ+Svz6EsD+ZjLj1at/D9Rbdk6B8/Pqp60zO9S2C47 gkqDdifbZK36z9ADZ7ZRh1RHAVmRYG+S+5mEMZSwOMB/Pb0hV+ND4Y/aejuLZQaRqVr+tM+J8 LLs+H1mipM4tC8I6daX/cqxdSsBUHqaznzpWF1ENHYKnsJRLoZLVDgjBUbtve7H3VXNePH1hw tbqHIbNeB5FU6YX2BwFr16KV4D3wT9aZ5PDMSn23u9Y1AOwyufl8vH9v+y9N97Lir+TmrQQ49 ebyR9zcja5pgwQI3K51XqdHzdAuRozNt6OT1GYhunUP5j984hluiawgl4GvfQII/UxIXA46w6 LHdBwBB9FWoPbcTFx+mfv2UhNm0XkN7gvhyMV+fCQ16oFRWC2AMKX/1P01ycGxQwCqoMZ+Z0s fVxkCdmtG4dDFwk4P8oGHB7FvVqVvBBEtILrLl2LP2w2XaKV2DjetOk9QuK7kG2CsF1MvMs/ X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.11 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:230666 Archived-At: Eli Zaretskii writes: > First, it isn't visiting the file (i.e. reading it into a buffer) that > takes time; in fact, the time to visit is almost entirely unaffected > by line length. What takes time is the display of the initial > windowful of the file's text (and following redisplay as result of > editing). So I guess the proposal is to have a time-out on that > initial display and on redisplay cycles. BTW (I already discussed this with Eli some time ago), we already have a solution in Emacs: longlines.el. It's obsoleted and a bit complicated, but something like #+begin_src emacs-lisp (add-hook 'find-file-hook (defun my-find-file-care-about-long-lines () (save-excursion (goto-char (point-min)) (when (and (not (eq major-mode 'image-mode)) (search-forward-regexp ".\\{2000\\}" 50000 t) (y-or-n-p "Very long lines detected - enable longlines-mode? ")) (require 'longlines) (longlines-mode +1))))) #+end_src solves the problem (though, using a heuristic in this case). If someone would want write a slim version of longlines, it could be part of a solution. Michael.