From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: cc-mode fontification feels random Date: Fri, 4 Jun 2021 12:05:18 +0100 Message-ID: References: <831r9iw473.fsf@gnu.org> <87h7ieyma7.fsf@gmail.com> <83wnr9vrpj.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="20323"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Daniel Colascione , theo@thornhill.no, ubolonton@gmail.com, emacs-devel To: Philipp Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 04 13:06:12 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 1lp7eW-000597-Di for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Jun 2021 13:06:12 +0200 Original-Received: from localhost ([::1]:41240 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lp7eV-00089z-ED for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Jun 2021 07:06:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lp7e0-0007TO-3L for emacs-devel@gnu.org; Fri, 04 Jun 2021 07:05:40 -0400 Original-Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]:36821) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lp7dt-0007qo-Qv; Fri, 04 Jun 2021 07:05:39 -0400 Original-Received: by mail-pg1-x532.google.com with SMTP id 27so7597579pgy.3; Fri, 04 Jun 2021 04:05:32 -0700 (PDT) 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:content-transfer-encoding; bh=1yPONsnLnstTWBnS4Pb2PTxi6lPX2IUk4CF6q3alGwo=; b=NVx39HZspYzqH6KP8yFBtJMIDSF7gtHz6UE0Gjl7Z1ntlAQNYG4sEiEDlBDFi4wuPS wF+Um7VnbUQy08euxqhsMPJ05Of+LrtJYwTVAcNYUk75tAhiK7jaXuQmzmbQ0iIjLhVP bB5oWFRfbAGXHpcMG7EOvSN0RPUR5YHtoljprkJLP4/eteg71xYfJh0u1JP9r+bir+dK fc7qXFFW2S9DXI9q2eZoEN3lawwZkO5amoofbBg0RYRYxKG2CYY6o6in32blZ7z6Rc7Z b15qvifZVQt8srhDM1RgIzJYa5ECeR9mvMLqkYYDwMHdkaPtACDSR5PnI6RdQ40bqGGV ovFg== 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:content-transfer-encoding; bh=1yPONsnLnstTWBnS4Pb2PTxi6lPX2IUk4CF6q3alGwo=; b=EidqFtQBKBxZW0OAfci4gVroPM2zsv77llo976F41hN/0lp2P9V4lJ3bDFti1LAJNH QCus0bgDIGuaT1aN+gPmtXd+iGf85sQhT23b/tUfN9ymghuO3dbNIvCeYwYg3PG4fPno aabTx7QaDmFKkSHfCadE/liDAbah1Q7Kzk8hqPF/Cp1VYoOzAkeHImRdeHjyxTWi5qIG Bgob1BHuj/2DJmELmK/iSz28LVQTZsisv39Kb+CVCJSgSsFhMaoAS1xlq2ih6uQPrylC 4C27oQXenC5LK91Mfu8m6XcCXSan9P6mq2c2rY03EYFmTcpgnD/O4a+R3B7+9sSa+VYE rq0w== X-Gm-Message-State: AOAM532MlxO98cU/FhR8WuaHMnsqJXddnB26QwRKPPpkp+LzekV5WhsL rDXijYG8L82AXAG9Knwyje3vXEWgKwGqo1g2vNo= X-Google-Smtp-Source: ABdhPJwbA2Ja9955j6hAUl0kHg1xC4HQaq0g1LJD788HbD/9oiKlTNtMSdkdIfcNVJvuilB5wnfHp81vbOf+3WhaFyw= X-Received: by 2002:a63:5f8b:: with SMTP id t133mr4350317pgb.411.1622804731715; Fri, 04 Jun 2021 04:05:31 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::532; envelope-from=joaotavora@gmail.com; helo=mail-pg1-x532.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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:270379 Archived-At: On Fri, Jun 4, 2021 at 11:59 AM Philipp wrote: > > Am 04.06.2021 um 12:39 schrieb Eli Zaretskii : > > > >> From: Jo=C3=A3o T=C3=A1vora > >> Cc: Eli Zaretskii , Daniel Colascione , > >> emacs-devel@gnu.org, ubolonton@gmail.com > >> Date: Fri, 04 Jun 2021 11:08:48 +0100 > >> > >> - However, LSP support for fontification seems like it's potentially > >> _less_ efficient than integrating something like tree-sitter as a C > >> module in Emacs. That's because the contents of the buffer and > >> fontification results are continually transmitted back and forth via > >> pipes and JSON format. > > > > The communication of buffer contents to these agents/servers is indeed > > one aspect of the existing packages (those I had time to look at) that > > I personally am unhappy about. Sending the whole buffer or its large > > chunks down the wire as buffer-substring (which requires encoding to > > be correct) is non-scalable, especially if it also requires conversion > > to JSON. > > How bad is is actually; are there good numbers on this? Not from me. Only gut feeling. But I have seen latency from servers befor= e. That just depends on the server and its architecture, I guess. However there are reports of enormous latency on Emacs side when JSON messages get very long and complex. Part of this related simply to JSON parsing and allocation of lots of lisp objects. My hunch is that fontification of a big and complex buffer would give rise to one of these big and complex JSON messages. Jo=C3=A3o