emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch: Syntax and Hard Newlines


From: Herbert Euler
Subject: Re: Patch: Syntax and Hard Newlines
Date: Wed, 29 Nov 2006 15:36:52 +0800

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/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]