From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Scrolling huge buffers and cc-mode Date: Wed, 19 Dec 2012 22:39:56 +0000 Message-ID: <20121219223956.GB3618@acm.acm> References: <50D03DBD.5000704@yandex.ru> <83txrjp8ry.fsf@gnu.org> <50D158F9.2070303@yandex.ru> <50D16AD7.5060005@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1355957201 23853 80.91.229.3 (19 Dec 2012 22:46:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 19 Dec 2012 22:46:41 +0000 (UTC) Cc: Eli Zaretskii , Stefan Monnier , emacs-devel@gnu.org To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 19 23:46:56 2012 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 1TlSPa-0003BX-Tk for ged-emacs-devel@m.gmane.org; Wed, 19 Dec 2012 23:46:51 +0100 Original-Received: from localhost ([::1]:42611 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlSPN-0008Lp-Df for ged-emacs-devel@m.gmane.org; Wed, 19 Dec 2012 17:46:37 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlSPJ-0008LZ-QX for emacs-devel@gnu.org; Wed, 19 Dec 2012 17:46:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TlSPI-0007Gq-JE for emacs-devel@gnu.org; Wed, 19 Dec 2012 17:46:33 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:50373 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlSPI-0007Gj-9N for emacs-devel@gnu.org; Wed, 19 Dec 2012 17:46:32 -0500 Original-Received: (qmail 76587 invoked by uid 3782); 19 Dec 2012 22:46:30 -0000 Original-Received: from acm.muc.de (pD951BE5E.dip.t-dialin.net [217.81.190.94]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 19 Dec 2012 23:46:28 +0100 Original-Received: (qmail 5237 invoked by uid 1000); 19 Dec 2012 22:39:56 -0000 Content-Disposition: inline In-Reply-To: <50D16AD7.5060005@yandex.ru> User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 8.x X-Received-From: 193.149.48.1 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:155674 Archived-At: On Wed, Dec 19, 2012 at 11:20:55AM +0400, Dmitry Antipov wrote: > It looks like the reason of slow scrolling is how the C++ namespaces are handled. > Basically my test file is: > namespace X { > namespace Y { > /* 13K lines of code */ > } } > /* middle-point */ > namespace X { > namespace Y { > /* 13K lines of code */ > } } > When scrolling reaches middle-point, everything hangs, most probably because > we need to scan huge regions (first and second namespace blocks). When I remove > all namespace definitions (with matched '}'), scrolling works much faster. OK, I'll have a look at it in the next few days. I have an idea for a solution, which would involve effectively masking out enclosing namespaces' braces, but this might be quite complicated to implement. Am I right in thinking that a namespace declaration _cannot_ be enclosed within any other type of declaration, such as a class? > Dmitry -- Alan Mackenzie (Nuremberg, Germany).