From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: yyoncho Newsgroups: gmane.emacs.devel Subject: Re: Using incremental parsing in Emacs Date: Mon, 6 Jan 2020 01:08:40 +0200 Message-ID: References: <83blrkj1o1.fsf@gnu.org> <20200105141900.GA71296@breton.holly.idiocy.org> <83eewdg3vy.fsf@gnu.org> <835zhpg0fz.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000007084bd059b6ca04b" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="110977"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Eli Zaretskii , alan@idiocy.org, emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 06 00:09:05 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ioF17-000Sko-Ax for ged-emacs-devel@m.gmane.org; Mon, 06 Jan 2020 00:09:05 +0100 Original-Received: from localhost ([::1]:46184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ioF15-00075K-UO for ged-emacs-devel@m.gmane.org; Sun, 05 Jan 2020 18:09:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52264) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ioF10-00075E-9t for emacs-devel@gnu.org; Sun, 05 Jan 2020 18:08:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ioF0z-000542-9i for emacs-devel@gnu.org; Sun, 05 Jan 2020 18:08:58 -0500 Original-Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]:46235) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ioF0x-00050u-Is; Sun, 05 Jan 2020 18:08:55 -0500 Original-Received: by mail-lf1-x131.google.com with SMTP id f15so35176615lfl.13; Sun, 05 Jan 2020 15:08:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=N40Ai3KDidR4Skzl8oFdGLgsewQpslD0BRROkmCBFtk=; b=FcZOUALjaREWchCFPh5XZY/Uexib2AuizQp76uYSfSaSdz7/p36ezQbrlENY/OxpPU gfeMllDuJsuhblBlwcWXBT98K6LO5scrHvhJXbmwtlCQpADtABYUWYrLfnmpuzpb7gP2 rjZix9SPfgUZsy0juFqYIRjNYTh5wRNEadtPn2oVlXHUWsf6qC6o8IWsvqawrpRrKWnZ jjbGNtTjM9HbVT2S5t8DDTvSknCutbA//2KAm9K3wj+6l+KJ+IShbnsN53ue6XMPr7AF EtPzDpPFD4Lyyky0dUnktZ+L5SEqou/6usdnllD/m33KJw6HxpYtetCcxDAaIkvq5Chr lexw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=N40Ai3KDidR4Skzl8oFdGLgsewQpslD0BRROkmCBFtk=; b=GAPZJVaTfvCfOyaAJ1pqJj3VO078Tco1b3MlRz3SV/TWUw48Z3jbzyV9ON62VeOEEd kLoknN0CmdOXF8993KZxPiOdntugaI3R2k2x/YGBhJkqHE6PLHEPT/zXWC7GUKd+Wfnz v3Qb/LjHdSNzCzjYGG7lTtQzQkVd9QI/m4h2EZe0X7QcXNPVdZnAwJWHDAlIh1sGMFUV gs5Mh+KGnqfwT2MpHeaEWuH+flpCQ26TMP9XYpK0te+eg8nRJnRfcKQ3oyaYT5ws34Pt G5XWNJK2rDoMCaHq5B+eh6T6iCG3Y/IQ3FBkMVbGNt/DxFCn6Ij39/Tj9Pq/LZ+asQ14 YgrQ== X-Gm-Message-State: APjAAAXhq0Rzw6usERf9xSgIOGvEyMocBsZeaNC375r7Q2j4vW5T0Uza LwMx4vVUw4ibXCCXuZGx4tb1/PN90+pe+gMhaOo= X-Google-Smtp-Source: APXvYqxn0Iin36EO4PSUdski7iswT34DfL441WQ77x0TqQN+6ydLY4nmYzuRBuqMyazPEkMA+PyI61em6F3Cta+uOJs= X-Received: by 2002:a19:4849:: with SMTP id v70mr54720794lfa.30.1578265734052; Sun, 05 Jan 2020 15:08:54 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::131 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:244013 Archived-At: --0000000000007084bd059b6ca04b Content-Type: text/plain; charset="UTF-8" On Mon, 6 Jan 2020, 00:10 Stefan Monnier, wrote: > > The question is how quickly this stops the parsing: any delay here > is very costly because the Elisp execution will have to sit idly waiting > for the parser to stop before it can continue its own execution. > Without looking into the implementation I bet that it checks for cancellations on each char. This means that we do not need to wait it to stop, we just have to ensure that if it reads one more char it is from the original content which could be achieved by caching one char ahead. > --0000000000007084bd059b6ca04b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, 6 Jan 2020, 00:10 Stefan Monnier, <m= onnier@iro.umontreal.ca> wrote:

The question is how quickly this stops the parsing: any delay here
is very costly because the Elisp execution will have to sit idly waiting for the parser to stop before it can continue its own execution.=C2=A0
<= /blockquote>
=C2=A0=C2=A0
Without looking into the implementation I bet that it checks for can= cellations on each char. This means that we do not need to wait it to stop,= we just have to ensure that if it reads one more char it is from the origi= nal content which could be achieved by caching one char ahead.=C2=A0
<= div dir=3D"auto">
--0000000000007084bd059b6ca04b--