From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: How to add pseudo vector types Date: Fri, 23 Jul 2021 19:57:32 -0700 Message-ID: <86a6mca06b.fsf@stephe-leake.org> References: <83h7gw6pyj.fsf@gnu.org> <45EBF16A-C953-42C7-97D1-3A2BFEF7DD01@gmail.com> <83y2a764oy.fsf@gnu.org> <83v95b60fn.fsf@gnu.org> <00DD5BFE-D14E-449A-9319-E7B725DEBFB3@gmail.com> <83r1fz5xr9.fsf@gnu.org> <1AAB1BCC-362B-4249-B785-4E0530E15C60@gmail.com> <83czri67h0.fsf@gnu.org> <46BBFF88-76C3-4818-8805-5437409BEA93@gmail.com> <83wnpq46uk.fsf@gnu.org> <533BD53B-4E85-4E9E-B46A-346A5BBAD0F5@gmail.com> <258CB68D-1CC1-42C8-BDCD-2A8A8099B783@gmail.com> <1a776770-50b7-93cd-6591-c9a5b3a56eb8@gmail.com> <83lf654dhk.fsf@gnu.org> <2524265f-60c7-24f5-b9f4-98447c91acab@gmail.com> <86o8av4olc.fsf@stephe-leake.org> <976cd611-52b3-5280-263e-ab8e3db8a355@gmail.com> <83k0lj4fml.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14900"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (windows-nt) Cc: =?utf-8?Q?Cl=C3=A9ment?= Pit-Claudel , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jul 24 04:58:26 2021 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 1m77rt-0003iX-JN for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Jul 2021 04:58:25 +0200 Original-Received: from localhost ([::1]:44490 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m77rq-0007l9-L1 for ged-emacs-devel@m.gmane-mx.org; Fri, 23 Jul 2021 22:58:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60154) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m77rB-00076U-LF for emacs-devel@gnu.org; Fri, 23 Jul 2021 22:57:41 -0400 Original-Received: from gateway30.websitewelcome.com ([192.185.152.11]:37008) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m77r8-0006p0-SB for emacs-devel@gnu.org; Fri, 23 Jul 2021 22:57:41 -0400 Original-Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway30.websitewelcome.com (Postfix) with ESMTP id 36CCEAE04 for ; Fri, 23 Jul 2021 21:57:37 -0500 (CDT) Original-Received: from host2007.hostmonster.com ([67.20.76.71]) by cmsmtp with SMTP id 77r6mMo4LoIHn77r7mYVma; Fri, 23 Jul 2021 21:57:37 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stephe-leake.org; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=pQoK2R4x86jcPIeHc1NINpopG6pMY/sZbSU4GkRukaY=; b=fe5LZ6vdpM42Ee8QIxHyK3w4ly 8o37AMg5OwC0pmZMV5rOK1j9bORQHU4DlYJSXyXMQyPRae5wEcg21lwXkdktW7YUAYIUlHmgKKUqu mHKrQEVlso85APLCkCm2kGSt8IfpcOuQ0AMLbrWYw/wbkfxLXMGgHhhojXrxInCcGE5a9X+mHWXmv SS4ddrkWMxRtGHGrASccOVWdJYvubOOBYLqLa0/Jh9hhHSn6ieQRiE9ao6Bh1GGmADllSjcU6viUR 0NV3lm6exNYyn4fVYZh8zRIP0k/dfjyvC5ihQTv30BduYbsbuNDnauDwtsFp5tH4ew0iVUJn1L33I kUpoNmKA==; Original-Received: from [76.77.182.20] (port=51512 helo=Takver4) by host2007.hostmonster.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1m77r6-0005wu-Fn; Fri, 23 Jul 2021 20:57:36 -0600 In-Reply-To: <83k0lj4fml.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 21 Jul 2021 22:43:30 +0300") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host2007.hostmonster.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stephe-leake.org X-BWhitelist: no X-Source-IP: 76.77.182.20 X-Source-L: No X-Exim-ID: 1m77r6-0005wu-Fn X-Source-Sender: (Takver4) [76.77.182.20]:51512 X-Source-Auth: stephen_leake@stephe-leake.org X-Email-Count: 7 X-Source-Cap: c3RlcGhlbGU7c3RlcGhlbGU7aG9zdDIwMDcuaG9zdG1vbnN0ZXIuY29t X-Local-Domain: yes Received-SPF: permerror client-ip=192.185.152.11; envelope-from=stephen_leake@stephe-leake.org; helo=gateway30.websitewelcome.com X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_NEUTRAL=0.779 autolearn=no autolearn_force=no X-Spam_action: no action 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:271519 Archived-At: Eli Zaretskii writes: >> From: Cl=C3=A9ment Pit-Claudel >> Date: Wed, 21 Jul 2021 12:54:16 -0400 >> >> On 7/21/21 12:29 PM, Stephen Leake wrote: >> > Yes, for both tree-sitter and wisi. wisi can take even longer if lots = of >> > error correction is required (I have a time-out set at 5 seconds). But >> > that happens when the file is first opened; I doubt any user would sta= rt >> > typing that fast. I know I typically take a while to just look at the >> > text, and then navigate to the point of interest. >> >> I'm not sure. We've had significant complaint in Flycheck for freezing = Emacs for <1s > > How much "less"? Close to 1 sec is indeed annoying, but 20 msec or so > should be bearable. > > You seem to assume up front that TS (re)-parsing will take 1 sec, but > AFAIK there's no reason to assume such bad performance. This is for the initial parse, on a large file. No matter how fast the parser is, I can give you a file that takes one second to parse, and some user will have such a file (the work always expands to consume all the resources available). I just got incremental parse working well enough to measure it; in the largest Ada file I have (10,000 lines from Eurocontrol): initial parse: 1.539319 seconds re-indent two lines: 0.038999 seconds 39 milliseconds for re-indent is just slow enough to be noticeable; I still have algorithms to convert to be as incremental as possible. The initial parse includes sending the full file text to the external process over a pipe. Parsing that same large file with the command-line parser (no emacs involved; file is memory-mapped) takes only 0.190 seconds, so there is lots of room for optimization - moving to a module with direct access to the emacs buffer should do a lot. In a very small file: initial 0.000632 seconds re-indent 0.000942 seconds Easily fast enough to keep up with the user. I don't have a direct comparison of tree-sitter and wisi parsing the same file; I'll have to see if I can set that up. -- -- Stephe