From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: A proposal for the future of open-paren-in-column-0-is-defun-start. Date: Mon, 06 Apr 2020 11:40:05 -0400 Message-ID: References: <20200405134735.GD5049@ACM> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="85580"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: acm@muc.de, emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Apr 06 17:40:54 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 1jLTro-000MAX-7J for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Apr 2020 17:40:52 +0200 Original-Received: from localhost ([::1]:34040 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLTrn-0004D4-A0 for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Apr 2020 11:40:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44244) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLTr9-0003JY-7O for emacs-devel@gnu.org; Mon, 06 Apr 2020 11:40:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLTr8-0003LZ-0t for emacs-devel@gnu.org; Mon, 06 Apr 2020 11:40:10 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:44913) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jLTr7-0003LF-T4; Mon, 06 Apr 2020 11:40:09 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id B1E3C80BAF; Mon, 6 Apr 2020 11:40:08 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id DB41180374; Mon, 6 Apr 2020 11:40:06 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1586187606; bh=v1hUMAQ/Q3Bt0f7C+9APH4QxvJc6+qgpXOAIu5eSGfs=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=CG1cmiWqA+lhJbIcUZyd0MFIatHHBDTX83TQ689HAXmxGD3eJkZoLQrM3NK1khObP 3Q9lnhNJ8Ifucw5XkXYTdIFJ2fCJyYKWhy8FOZIMop/qzVPvpevtPPNt476PfIHfOw AIgUtewtPu7MCDmHRrhvSSWRkTwNZ9m+eKwDxe84MrUoSWpj/vKZG+YqOqWJdrNt2j Po1kWa2iyMCbkNFqK4EZeFjLbpwYECBtGNvzYYi2tJM+kN0dqRQd5QPJ4TUEHaZJHJ WNK37T4a1WBfHi+Qju5op7aQIeg+Xbfnqk4fkxJj5fZl79aYucD6CjgwQLJ+w3cc7o ndSv1B+1OhtxA== Original-Received: from alfajor (unknown [104.247.241.114]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 567C51206A7; Mon, 6 Apr 2020 11:40:06 -0400 (EDT) In-Reply-To: (Richard Stallman's message of "Sun, 05 Apr 2020 22:37:29 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 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:246536 Archived-At: > In that case, we could arrange for open-paren-in-column-0-is-defun-start > to be heeded _along with_ comment-use-syntax-ppss. Be my guest. But before accepting such code, I'll want to see some concrete evidence that it has a real benefit. So far, all concrete evidence we have has no direct connection to open-parens-in-column-0 (other than some people's gut feelings). We should treat this performance problem the same as any other: do the profiling, look into the code that takes the major part of the time, look into why it takes so much time, ... So far we have: scrolling is too slow in some C buffer and the profile indicates it happens "somewhere in jit-lock". There's a lot that might be going on "in jit-lock", so we've barely scratched the surface of the problem. My gut feeling is that we're going to find that we're not spending much of that time in `back_comment` (the C function which used this open-paren-in-column-0 heuristic). This seems to be confirmed by the fact that setting comment-use-syntax-ppss to nil made no difference: the problem is elsewhere and we're just wasting time discussing this old heuristic whose time has passed. Stefan