From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Herbert Euler" Newsgroups: gmane.emacs.devel Subject: Re: Patch: Syntax and Hard Newlines Date: Wed, 29 Nov 2006 15:36:52 +0800 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: sea.gmane.org 1164785896 3092 80.91.229.2 (29 Nov 2006 07:38:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 29 Nov 2006 07:38:16 +0000 (UTC) Cc: rudalics@gmx.at, rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 29 08:38:14 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GpK1B-0001bz-GW for ged-emacs-devel@m.gmane.org; Wed, 29 Nov 2006 08:38:09 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GpK1B-0007OG-0B for ged-emacs-devel@m.gmane.org; Wed, 29 Nov 2006 02:38:09 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GpK09-0006fP-46 for emacs-devel@gnu.org; Wed, 29 Nov 2006 02:37:05 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GpK02-0006Zd-K0 for emacs-devel@gnu.org; Wed, 29 Nov 2006 02:36:59 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GpK01-0006Yz-Th for emacs-devel@gnu.org; Wed, 29 Nov 2006 02:36:57 -0500 Original-Received: from [65.54.246.156] (helo=bay0-omc2-s20.bay0.hotmail.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GpJzz-0006yy-8e; Wed, 29 Nov 2006 02:36:55 -0500 Original-Received: from hotmail.com ([64.4.26.35]) by bay0-omc2-s20.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 28 Nov 2006 23:36:53 -0800 Original-Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 28 Nov 2006 23:36:53 -0800 Original-Received: from 64.4.26.200 by by112fd.bay112.hotmail.msn.com with HTTP; Wed, 29 Nov 2006 07:36:52 GMT X-Originating-IP: [216.145.54.158] X-Originating-Email: [herberteuler@hotmail.com] X-Sender: herberteuler@hotmail.com In-Reply-To: Original-To: monnier@iro.umontreal.ca X-OriginalArrivalTime: 29 Nov 2006 07:36:53.0307 (UTC) FILETIME=[23A8F0B0:01C71389] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:63023 Archived-At: >Although I wonder why you did > > (let (old-time > time-diff > (parse-sexp-lookup-properties nil)) > (save-window-excursion > (switch-to-buffer "1.pl") > (font-lock-mode -1) > (goto-char 268273054) > (jit-lock-mode nil) > (font-lock-mode 1) > (setq old-time (current-time)) > (parse-partial-sexp 1 (point)) > (setq time-diff (time-subtract (current-time) > old-time))) > >rather than > > (with-current-buffer (find-file-noselect "1.pl") > (font-lock-mode -1) > (setq font-lock-support-mode nil) > (font-lock-mode 1) > (let ((old-time (current-time)) > (parse-sexp-lookup-properties nil)) > (parse-partial-sexp (point-min) (point-max)) > (time-subtract (current-time) old-time))) These are the results of evaluating the forms defined by you: (with-current-buffer (find-file-noselect "1.pl") (font-lock-mode -1) (setq font-lock-support-mode nil) (font-lock-mode 1) (let ((old-time (current-time)) (parse-sexp-lookup-properties nil)) (parse-partial-sexp (point-min) (point-max)) (time-subtract (current-time) old-time))) => (0 12 944334) (with-current-buffer (find-file-noselect "1.pl") (font-lock-mode -1) (setq font-lock-support-mode nil) (font-lock-mode 1) (let ((old-time (current-time)) (parse-sexp-lookup-properties t)) (parse-partial-sexp (point-min) (point-max)) (time-subtract (current-time) old-time))) => (0 12 918259) (with-current-buffer (find-file-noselect "1.pl") (font-lock-mode -1) (setq font-lock-support-mode nil) (font-lock-mode 1) (let ((old-time (current-time)) (parse-sexp-lookup-properties nil)) (parse-partial-sexp (point-min) (point-max)) (time-subtract (current-time) old-time))) => (0 12 907874) (with-current-buffer (find-file-noselect "1.pl") (font-lock-mode -1) (setq font-lock-support-mode nil) (font-lock-mode 1) (let ((old-time (current-time)) (parse-sexp-lookup-properties t)) (parse-partial-sexp (point-min) (point-max)) (time-subtract (current-time) old-time))) => (0 12 916414) (with-current-buffer (find-file-noselect "1.pl") (font-lock-mode -1) (setq font-lock-support-mode nil) (font-lock-mode 1) (let ((old-time (current-time)) (parse-sexp-lookup-properties nil)) (parse-partial-sexp (point-min) (point-max)) (time-subtract (current-time) old-time))) => (0 12 935408) (with-current-buffer (find-file-noselect "1.pl") (font-lock-mode -1) (setq font-lock-support-mode nil) (font-lock-mode 1) (let ((old-time (current-time)) (parse-sexp-lookup-properties t)) (parse-partial-sexp (point-min) (point-max)) (time-subtract (current-time) old-time))) => (0 13 12071) (with-current-buffer (find-file-noselect "1.pl") (font-lock-mode -1) (setq font-lock-support-mode nil) (font-lock-mode 1) (let ((old-time (current-time)) (parse-sexp-lookup-properties nil)) (parse-partial-sexp (point-min) (point-max)) (time-subtract (current-time) old-time))) => (0 12 927589) (with-current-buffer (find-file-noselect "1.pl") (font-lock-mode -1) (setq font-lock-support-mode nil) (font-lock-mode 1) (let ((old-time (current-time)) (parse-sexp-lookup-properties t)) (parse-partial-sexp (point-min) (point-max)) (time-subtract (current-time) old-time))) => (0 12 920150) (with-current-buffer (find-file-noselect "1.pl") (font-lock-mode -1) (setq font-lock-support-mode nil) (font-lock-mode 1) (let ((old-time (current-time)) (parse-sexp-lookup-properties nil)) (parse-partial-sexp (point-min) (point-max)) (time-subtract (current-time) old-time))) => (0 12 819639) (with-current-buffer (find-file-noselect "1.pl") (font-lock-mode -1) (setq font-lock-support-mode nil) (font-lock-mode 1) (let ((old-time (current-time)) (parse-sexp-lookup-properties t)) (parse-partial-sexp (point-min) (point-max)) (time-subtract (current-time) old-time))) => (0 12 926456) (with-current-buffer (find-file-noselect "1.pl") (font-lock-mode -1) (setq font-lock-support-mode nil) (font-lock-mode 1) (let ((old-time (current-time)) (parse-sexp-lookup-properties nil)) (parse-partial-sexp (point-min) (point-max)) (time-subtract (current-time) old-time))) => (0 12 877235) (with-current-buffer (find-file-noselect "1.pl") (font-lock-mode -1) (setq font-lock-support-mode nil) (font-lock-mode 1) (let ((old-time (current-time)) (parse-sexp-lookup-properties t)) (parse-partial-sexp (point-min) (point-max)) (time-subtract (current-time) old-time))) => (0 12 915513) (with-current-buffer (find-file-noselect "1.pl") (font-lock-mode -1) (setq font-lock-support-mode nil) (font-lock-mode 1) (let ((old-time (current-time)) (parse-sexp-lookup-properties nil)) (parse-partial-sexp (point-min) (point-max)) (time-subtract (current-time) old-time))) => (0 12 822557) (with-current-buffer (find-file-noselect "1.pl") (font-lock-mode -1) (setq font-lock-support-mode nil) (font-lock-mode 1) (let ((old-time (current-time)) (parse-sexp-lookup-properties t)) (parse-partial-sexp (point-min) (point-max)) (time-subtract (current-time) old-time))) => (0 12 960385) I got "Fontifying 1.pl...buffer size greater than font-lock-maximum-size" when evaluating the forms. >>From this result I can see the delay caused by `parse-sexp-lookup-properties'. Regards, Guanpeng Xu _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/