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: Sun, 18 Mar 2018 22:39:28 +0200 Message-ID: <834lldp18f.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1521405454 15968 195.159.176.226 (18 Mar 2018 20:37:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 18 Mar 2018 20:37:34 +0000 (UTC) Cc: emacs-devel@gnu.org To: Sebastian Sturm Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 18 21:37:30 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 1exf3a-00043s-1W for ged-emacs-devel@m.gmane.org; Sun, 18 Mar 2018 21:37:30 +0100 Original-Received: from localhost ([::1]:39109 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1exf5b-0000h9-BO for ged-emacs-devel@m.gmane.org; Sun, 18 Mar 2018 16:39:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47996) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1exf5S-0000gm-Ex for emacs-devel@gnu.org; Sun, 18 Mar 2018 16:39:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1exf5N-00063q-Iw for emacs-devel@gnu.org; Sun, 18 Mar 2018 16:39:26 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41821) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1exf5N-00063k-Ez; Sun, 18 Mar 2018 16:39:21 -0400 Original-Received: from [176.228.60.248] (port=1571 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1exf5M-00081o-TD; Sun, 18 Mar 2018 16:39:21 -0400 In-reply-to: (message from Sebastian Sturm on Sun, 18 Mar 2018 21:14:53 +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:223791 Archived-At: > From: Sebastian Sturm > Date: Sun, 18 Mar 2018 21:14:53 +0100 > > [1] I'm using cquery for my C++ editing needs, which comes with an > overlay-based semantic highlighting mechanism. With my emacs > configuration, lsp-mode/lsp-ui emit 6 calls to line-number-at-pos per > character insertion, which consume ~20 to 25 ms each when performing > edits close to the bottom of a 66KB C++ file (measured using > (benchmark-run 1000 (line-number-at-pos (point))) on a release build of > emacs-27/git commit #9942734...). Using the noverlay branch, this figure > drops to ~160us per call. If lsp-mode/lsp-ui needs a fast line counter, one can easily be provided by exposing find_newline to Lisp. IME, it's lightning-fast, and should run circles around count-lines (used by line-number-at-pos). (I'm not sure I even understand how overlays come into play here, btw.)