From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: How to add pseudo vector types Date: Tue, 03 Aug 2021 16:34:32 +0300 Message-ID: <835ywmmz2v.fsf@gnu.org> References: <83eeban40n.fsf@gnu.org> <83bl6en2ax.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26632"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, stephen_leake@stephe-leake.org, cpitclaudel@gmail.com, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 03 15:35:13 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 1mAuZc-0006ho-W6 for ged-emacs-devel@m.gmane-mx.org; Tue, 03 Aug 2021 15:35:12 +0200 Original-Received: from localhost ([::1]:47108 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mAuZb-0006QK-WB for ged-emacs-devel@m.gmane-mx.org; Tue, 03 Aug 2021 09:35:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mAuZ6-0005i0-E4 for emacs-devel@gnu.org; Tue, 03 Aug 2021 09:34:40 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:49958) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mAuZ5-0007dy-LB; Tue, 03 Aug 2021 09:34:39 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1743 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mAuZ3-0007uL-Qk; Tue, 03 Aug 2021 09:34:39 -0400 In-Reply-To: (message from Stefan Monnier on Tue, 03 Aug 2021 09:28:57 -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:271981 Archived-At: > From: Stefan Monnier > Cc: Fu Yuan , stephen_leake@stephe-leake.org, > cpitclaudel@gmail.com, emacs-devel@gnu.org > Date: Tue, 03 Aug 2021 09:28:57 -0400 > > > But that's sub-optimal, no? Imagine a very large buffer which was > > narrowed to a small portion near EOB, then a modification made very > > close to EOB but partially before BEGV, then the buffer widened. With > > your method, TS will now have to re-parse almost the entire buffer, > > whereas we know it needs to re-parse a very small portion of it. > > As a general rule, we will most likely want to work hard to avoid > exposing the narrowed buffer to TS (i.e. most calls to TS will first > `widen`). Sure. I was thinking about those corner cases where we won't.