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?7KGw7ISx67mI?= Newsgroups: gmane.emacs.devel Subject: Re: Reliable after-change-functions (via: Using incremental parsing in Emacs) Date: Wed, 1 Apr 2020 03:42:31 +0900 Message-ID: References: <835zek1kpv.fsf@gnu.org> Mime-Version: 1.0 (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="93825"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , casouri@gmail.com, akrl@sdf.org, Emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 31 20:43:30 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 1jJLrE-000OEJ-0W for ged-emacs-devel@m.gmane-mx.org; Tue, 31 Mar 2020 20:43:28 +0200 Original-Received: from localhost ([::1]:42942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJLrD-00038f-1X for ged-emacs-devel@m.gmane-mx.org; Tue, 31 Mar 2020 14:43:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33792) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJLqQ-0002Is-VV for emacs-devel@gnu.org; Tue, 31 Mar 2020 14:42:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJLqP-0003VB-Rf for emacs-devel@gnu.org; Tue, 31 Mar 2020 14:42:38 -0400 Original-Received: from pv50p00im-ztdg10021801.me.com ([17.58.6.56]:37885) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jJLqP-0003Sb-MI for emacs-devel@gnu.org; Tue, 31 Mar 2020 14:42:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1585680154; bh=VT4aAHpekVI8nEvG6zl5VG5OgOCVkyKBjKLF8bHxmsQ=; h=Content-Type:From:Subject:Date:Message-Id:To; b=wk9+5gRZH6HAAVYwVlrGq56f2Vb1DabYkoZI4tyAy037ieZUu/s8S4ggml+sPaDku zUlIWG/3qWCH8XJAwhagHdi9g+xbAmMGawrziVwl83YLrMhRfn9LpLENTyIShZIWSI AxFlLsJQhbBx12mDAt1XtLTfruk/Dxx5uX+MlRg8+gFJ8UOgIA7x7Tnq2yzRNV2D95 gtfNmHFd3qr2QFq2bHJGXd/ZkjgeskaTSwCemJHKJ3RLwlo5g+B/Je6+MZsZHvPse9 Jl+Dd67aDf/H+8rGj6Fed9bX6dmngHcucIwAgo66LBoKhEF29y2m6srrHDeMmSLxgr p1eR9NhKja1EA== Original-Received: from [192.168.0.3] (unknown [1.230.108.64]) by pv50p00im-ztdg10021801.me.com (Postfix) with ESMTPSA id 55D7C36041F; Tue, 31 Mar 2020 18:42:34 +0000 (UTC) In-Reply-To: <835zek1kpv.fsf@gnu.org> X-Mailer: iPhone Mail (17E255) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2020-03-31_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 mlxscore=0 mlxlogscore=922 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-2003310156 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 17.58.6.56 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:246145 Archived-At: > 2020. 4. 1. =EC=98=A4=EC=A0=84 2:53, Eli Zaretskii =EC=9E=91= =EC=84=B1: >=20 > =EF=BB=BF >>=20 >> From: Stefan Monnier >> Cc: casouri@gmail.com, emacs-devel@gnu.org, akrl@sdf.org >> Date: Tue, 31 Mar 2020 13:10:27 -0400 >>=20 >>>> How large is "very large" here? >>> xdisp.c comes to mind, obviously. >>=20 >> I'd expect tree-sitter to be able to parse xdisp.c in one second or less.= >=20 > One second of delay before the first window-full is displayed? This > is like infinity. Maybe I misunderstood, or maybe it=E2=80=99s just b.c. I don=E2=80=99t know e= nough internals, but doesn=E2=80=99t Emacs just display the raw text until h= ighlighting is finished? It wouldn=E2=80=99t be an experience of not seeing t= he text for a sec, it would be more of a see the text and highlights are app= lied later. =20 > And you didn't account for the time to take buffer-string of the > entire buffer (which involves allocating a large chunk of memory), > then encode it in UTF-8 (which needs to allocate another chunk of > memory), and pass that to tree-sitter. If that's what the current > interface does. >=20