From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#15841: Display bugs with cache-long-lines non-nil Date: Mon, 11 Nov 2013 04:39:56 +0100 Message-ID: <87li0vppwz.fsf@web.de> References: <871u2xf9st.fsf@gmail.com> <9jiow9uhoa.fsf@fencepost.gnu.org> <87wqkopylw.fsf@gmail.com> <87bo20fh3h.fsf@web.de> <834n7q95d5.fsf@gnu.org> <87r4aqww3j.fsf@nbtrap.com> <83r4aq3s4r.fsf@gnu.org> <83ppqa3rim.fsf@gnu.org> <87eh6o6rvm.fsf@web.de> <83y54w2jo1.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1384141277 2270 80.91.229.3 (11 Nov 2013 03:41:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Nov 2013 03:41:17 +0000 (UTC) Cc: 15841@debbugs.gnu.org, nbtrap@nbtrap.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 11 04:41:20 2013 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 1VfiNL-00016g-Ir for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Nov 2013 04:41:19 +0100 Original-Received: from localhost ([::1]:34524 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VfiNL-0008Ma-5A for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Nov 2013 22:41:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VfiNB-0008MJ-O9 for bug-gnu-emacs@gnu.org; Sun, 10 Nov 2013 22:41:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VfiN5-0008Np-UF for bug-gnu-emacs@gnu.org; Sun, 10 Nov 2013 22:41:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60334) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VfiN5-0008Nl-QX for bug-gnu-emacs@gnu.org; Sun, 10 Nov 2013 22:41:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VfiN4-00007d-ML for bug-gnu-emacs@gnu.org; Sun, 10 Nov 2013 22:41:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Nov 2013 03:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15841 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15841-submit@debbugs.gnu.org id=B15841.1384141216413 (code B ref 15841); Mon, 11 Nov 2013 03:41:02 +0000 Original-Received: (at 15841) by debbugs.gnu.org; 11 Nov 2013 03:40:16 +0000 Original-Received: from localhost ([127.0.0.1]:46120 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VfiMJ-00006b-R9 for submit@debbugs.gnu.org; Sun, 10 Nov 2013 22:40:16 -0500 Original-Received: from mout.web.de ([212.227.17.12]:50972) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VfiMF-00006D-0P for 15841@debbugs.gnu.org; Sun, 10 Nov 2013 22:40:12 -0500 Original-Received: from drachen.dragon ([90.186.249.242]) by smtp.web.de (mrweb102) with ESMTPA (Nemesis) id 0Lrruc-1VasnM1wGk-013dvw for <15841@debbugs.gnu.org>; Mon, 11 Nov 2013 04:40:04 +0100 In-Reply-To: <83y54w2jo1.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 10 Nov 2013 20:31:10 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Provags-ID: V03:K0:SZcyNdizjt1kNF7US/lV5sX6Vg+5lr5r/4RF4laVlYfkcbSBJUw 3yI2BBgspVUi8y0xDptO/v/QJGLsySVcESXltoLOlWbTFrNq0aCGLerFUR1tnbnLkileF6U Q3QKetoG3gr8jAofsQLisDQ8k1SE9Qep2ck4f1T3Dee+EmBP3afhPHa91anENB/2HYVkynh caeReVpLuSDfHAOangIUw== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:80244 Archived-At: Eli Zaretskii writes: > > Anyway, I'll tell you when I have a recipe. Some elaborations, feel free to ignore. The culprit was my own code: it placed myriads of invisible overlays with no properties into the buffer. Under these extreme circumstances, `line-number-at-pos' indeed gets extremely slow at the end of my 10000 lines buffer: one invocation needs over a second. I saw that with elp as well as with profiler. Setting `cache-long-scans' to nil (or removing the overlays) cures this. Although this is a corner case, I wonder why overlays slow down `line-number-at-pos' so much for `cache-long-scans' non-nil - is that expected? Or can the profiler times I saw span redisplay times? Because, when I use this: (defmacro my-measure-time (expr) "Eval EXPR, display how much time it took." (with-gensyms (time) `(let ((,time (current-time))) ,expr (message "%s secs" (float-time (time-subtract (current-time) ,time)))))) and evaluate (my-measure-time (line-number-at-pos)) manually with M-: (in the same situation), it shows a very tiny value. But I'm sure that from code, `line-number-at-pos' really lasts over a second. Strange, I don't understand it. Regards, Michael.