From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: /srv/bzr/emacs/trunk r101338: * lisp/emacs-lisp/syntax.el (syntax-ppss): More sanity check to catch Date: Thu, 13 Feb 2014 14:46:11 +0100 Organization: Organization?!? Message-ID: <87bnyb6s7w.fsf@fencepost.gnu.org> References: <87r47bi1e5.fsf@yandex.ru> <52F96284.50507@yandex.ru> <52FAE12B.6060101@yandex.ru> <52FC3BEE.60604@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1392299198 25023 80.91.229.3 (13 Feb 2014 13:46:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Feb 2014 13:46:38 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 13 14:46:46 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WDwcn-0000jj-V9 for ged-emacs-devel@m.gmane.org; Thu, 13 Feb 2014 14:46:46 +0100 Original-Received: from localhost ([::1]:46471 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDwcn-0002gF-JS for ged-emacs-devel@m.gmane.org; Thu, 13 Feb 2014 08:46:45 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59746) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDwce-0002fv-Ii for emacs-devel@gnu.org; Thu, 13 Feb 2014 08:46:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WDwcX-00087a-6A for emacs-devel@gnu.org; Thu, 13 Feb 2014 08:46:36 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:34602) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDwcW-00087V-VS for emacs-devel@gnu.org; Thu, 13 Feb 2014 08:46:29 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WDwcU-0000Rv-QG for emacs-devel@gnu.org; Thu, 13 Feb 2014 14:46:26 +0100 Original-Received: from x2f432d4.dyn.telefonica.de ([2.244.50.212]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 13 Feb 2014 14:46:26 +0100 Original-Received: from dak by x2f432d4.dyn.telefonica.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 13 Feb 2014 14:46:26 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 33 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: x2f432d4.dyn.telefonica.de X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:UV9nnnpQKY9FEHvkOGakO9EiXhw= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:169583 Archived-At: Stefan Monnier writes: >>> In 99% of the cases, syntax-ppss is only called once during font-lock. >>> So, while in theory, yes, we might still get some benefits, in practice >>> we don't. >> `syntax-propertize' can call it multiple times, though (at least in the case >> of ruby-mode), and that's called as often as font-lock. > > Yes, that's part of the remaining 1%. > >> By the way, AFAICT, the juggling of local variables between modes (save, >> restore, rinse, repeat) is one of the major factors in mmm-mode performance. > > I can believe that. > >> There was an old `multi-mode' by Dave Love that used indirect buffers to >> keep the buffer-local values around, and switched between them in >> post-command-hook (which might or might not have been a good idea) and in >> `multi-fontify-region', taking advantage of the fact that fontification in >> an indirect buffer translates into the base buffer. >> Now I hear that we shouldn't use indirect buffers. > > Indeed, I don't think using an indirect buffer is a good solution. > I'm not even sure it's faster than mmm's "manual" variable switch. Using different modes on a buffer would seem like a rather canonical use case for indirect buffers. If they don't work well for that, one needs to think about _what_ would work better. That may mean improving indirect buffers or creating something different. In which case one should recheck whether indirect buffers work well for _anything_. -- David Kastrup