From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: State of the overlay tree branch? Date: Fri, 23 Mar 2018 15:39:22 +0300 Message-ID: <83bmffhsp1.fsf@gnu.org> References: <834lldp18f.fsf@gnu.org> <9646341d-700b-4240-216b-8c0e753fa79f@arkona-technologies.de> <86d03e78-9984-f33e-a3f3-3faa4b34d78b@arkona-technologies.de> <83vadso9ad.fsf@gnu.org> <5155d5e2-6b5c-581e-89fe-4f3af717304f@arkona-technologies.de> <4c82fcbd-961a-c6ca-b1f0-6b85665cb339@arkona-technologies.de> <83o9jfi5a9.fsf@gnu.org> <83efkbi2hb.fsf@gnu.org> <3098c9f6-31c4-e611-22af-865ba810f860@arkona-technologies.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1521808737 2959 195.159.176.226 (23 Mar 2018 12:38:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 23 Mar 2018 12:38:57 +0000 (UTC) Cc: emacs-devel@gnu.org To: Sebastian Sturm Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 23 13:38:52 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 1ezLy8-0000h4-EW for ged-emacs-devel@m.gmane.org; Fri, 23 Mar 2018 13:38:52 +0100 Original-Received: from localhost ([::1]:37879 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ezM0B-0001Lx-Kg for ged-emacs-devel@m.gmane.org; Fri, 23 Mar 2018 08:40:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38427) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ezLye-0000ok-M5 for emacs-devel@gnu.org; Fri, 23 Mar 2018 08:39:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ezLyb-0004J7-Gz for emacs-devel@gnu.org; Fri, 23 Mar 2018 08:39:24 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54162) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ezLyb-0004J3-Cw; Fri, 23 Mar 2018 08:39:21 -0400 Original-Received: from [176.228.60.248] (port=2057 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ezLya-00011U-Qo; Fri, 23 Mar 2018 08:39:21 -0400 In-reply-to: <3098c9f6-31c4-e611-22af-865ba810f860@arkona-technologies.de> (message from Sebastian Sturm on Fri, 23 Mar 2018 11:15:48 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:223958 Archived-At: > From: Sebastian Sturm > Date: Fri, 23 Mar 2018 11:15:48 +0100 > > > Also, what about my suggestion to count lines in a relative manner, > > using count-lines from a line with a known number? You never replied > > to that suggestion. > > you're right, sorry. In my opinion, a caching mechanism might be a very > useful thing to have if it provides further performance benefits on top > of what the noverlay branch has to offer. However, since count-lines may > not be the only function that has to convert between char and byte > positions (or is it?), and since the noverlay branch seems to resolve > the overlay issue without having to introduce additional complexity in > the elisp layer, implementing a caching mechanism before noverlay is > merged into the master branch seems like a premature optimization to me. It isn't premature optimization, because a buffer could have many markers even if it has no or only a few overlays. > Of course this is a layman's opinion (and maybe the case of "few > overlays but many markers" is not as pathological as it appears to me); > if you think a line number cache should be implemented, I'll go and > discuss that with the lsp-mode maintainers (assuming that they are among > the heaviest users of line-number-at-pos). I think the effect should be at least measured before the decision whether to do that is made.