From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?UTF-8?B?VHXhuqVuIEFuaCBOZ3V54buFbg==?= Newsgroups: gmane.emacs.devel Subject: Re: Reliable after-change-functions (via: Using incremental parsing in Emacs) Date: Wed, 1 Apr 2020 00:07:27 +0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="120993"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 31 19:20:16 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJKYh-000VOy-VZ for ged-emacs-devel@m.gmane-mx.org; Tue, 31 Mar 2020 19:20:15 +0200 Original-Received: from localhost ([::1]:42084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJKYg-0005Sg-W2 for ged-emacs-devel@m.gmane-mx.org; Tue, 31 Mar 2020 13:20:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47636) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJKMc-0005Mw-Nr for emacs-devel@gnu.org; Tue, 31 Mar 2020 13:07:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJKMb-00022O-Qh for emacs-devel@gnu.org; Tue, 31 Mar 2020 13:07:46 -0400 Original-Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]:39346) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJKMb-000223-JS for emacs-devel@gnu.org; Tue, 31 Mar 2020 13:07:45 -0400 Original-Received: by mail-pj1-x1041.google.com with SMTP id z3so1331293pjr.4 for ; Tue, 31 Mar 2020 10:07:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=MtqxyTakMNYY9MLNqxXMRLNZjveY3Qe2v7R7LBh+NPM=; b=n7sy5iMhdCf0BMq9KUp3J+0Opey2rGqg3qICP9obhFnqsBqPIs1KRu2J4kAs7iAC4G XtPVEDbgmyyIPSxvliBSH5mPfvHk22UIB6pfTKDigul6dlXz9Sx3TMpY3CtHUGGBsoKq WsAY5IrO+tytrGqZUC+4geZlRYutRO7KLbXH8xBrTVdnY4JBxrPbxAS9CR3iB/fHiKL9 bhdjbXOD7j+GNrp4UFX2VDH4RdELcZifBSDv3zg4aA+RoJaHO66XfQ39IbmKBiW3sVwJ W9tEU/spCStvHSY1YPLx1sieqT2Z93308LTdG8kFePYqjHaoJCNgVbLLMaSqm9ojzS5h 3yLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=MtqxyTakMNYY9MLNqxXMRLNZjveY3Qe2v7R7LBh+NPM=; b=HUCTMCuuxCtsnsH1srGAuK33ffLcsBan/0j9JRXRdDhuhU+ytmjzqUqaIm/jmnNlH7 USwudEMeIMFVNv9B790U+bceaIAXcww9ioSnwsR3O1+sNPy3QGWrozE9/E2L09FqEQae aZbuX/3P7CJNy1fV8EmBD9kuGnwJVdU+N6fZ2OTC267iGKy7wcTkDsk1J8b2Ctm0X4gM XOKCDqRF/dSY4wuHz1vMkMbDiZuH36vpVU7PCWPmmZkKZGGlLUa0HdhLqiufNVIp0GO7 HDiAAhQCc6uETKC48pwsccKp0KgPqE4AUHjrPo0CNjGhPAawKivDM1sqlDsPOOgd6fGH UOBQ== X-Gm-Message-State: AGi0PuY9+Hc37Nj0a0xIXFhM56cNIcyp52NQ35KWgtat/dXVHNhitJQR i31YNrb+8V4Qm0PRZFam+EAOtzO1lm+vK9rBuIp+270YRJY= X-Google-Smtp-Source: APiQypKtQ+2KnmB2QJ4JyLd5UMnSGTyDP/COTa0iZ+5HqYQ81uMrCB1TUfgOlkWrgeMANZphjjGwKPdWrqGGMPE2LsI= X-Received: by 2002:a17:90a:7302:: with SMTP id m2mr5098605pjk.7.1585674464035; Tue, 31 Mar 2020 10:07:44 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::1041 X-Mailman-Approved-At: Tue, 31 Mar 2020 13:19:29 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:246127 Archived-At: > In any case, I hope that passing the buffer to tree-sitter doesn't > involve marshalling the entire buffer text via a function call as a > huge string, or some such. We should instead request that tree-sitter > exposes an API through which we could give it direct access to buffer > text as 2 parts, before and after the gap, like we do with regex > code. Otherwise this will be a bottleneck in the long run, not unlike > the problem we have with LSP. It does support parsing through direct access. Which is why I wanted dynamic modules to have direct access to buffer text. >> How large is "very large" here? > > xdisp.c comes to mind, obviously. On my machine, a 3.39 GHz Intel Core i7: (0.150791 0 0.0) ; 1 full parse (2.142236 5 0.6105190000000107) ; 10 full parses (0.015423 0 0.0) ; incremental parsing, after typing 1 character -- Tu=E1=BA=A5n-Anh Nguy=E1=BB=85n Software Engineer