|
From: | Herbert Euler |
Subject: | Re: Patch: Syntax and Hard Newlines |
Date: | Thu, 23 Nov 2006 11:27:57 +0800 |
I don't think that is a real test, because merely enabling Emacs Lisp mode does not parse anything. You need to do some parsing across the buffer.
What about this? The same file with 4185181 lines, totally 204MB. (let (time-diff state) (save-window-excursion (let (old-time) (switch-to-buffer "large_file") (emacs-lisp-mode) (setq parse-sexp-lookup-properties nil old-time (current-time)) (goto-char (point-max)) (setq state (syntax-ppss (point)) time-diff (time-subtract (current-time) old-time)))) (pp state) time-diff) -| (0 nil 213444184 nil nil nil 0 nil nil nil) => (0 25 882543) (let (time-diff state) (save-window-excursion (let (old-time) (switch-to-buffer "large_file") (emacs-lisp-mode) (setq parse-sexp-lookup-properties t old-time (current-time)) (goto-char (point-max)) (setq state (syntax-ppss (point)) time-diff (time-subtract (current-time) old-time)))) (pp state) time-diff) -| (0 nil nil nil t nil 0 nil 1 nil) => (0 20 81466) (let (time-diff state) (save-window-excursion (let (old-time) (switch-to-buffer "large_file") (emacs-lisp-mode) (setq parse-sexp-lookup-properties nil old-time (current-time)) (goto-char (point-max)) (setq state (syntax-ppss (point)) time-diff (time-subtract (current-time) old-time)))) (pp state) time-diff) -| (0 nil 213444184 nil nil nil 0 nil nil nil) => (0 26 100278) (let (time-diff state) (save-window-excursion (let (old-time) (switch-to-buffer "large_file") (emacs-lisp-mode) (setq parse-sexp-lookup-properties t old-time (current-time)) (goto-char (point-max)) (setq state (syntax-ppss (point)) time-diff (time-subtract (current-time) old-time)))) (pp state) time-diff) -| (0 nil nil nil t nil 0 nil 1 nil) => (0 20 88486) (let (time-diff state) (save-window-excursion (let (old-time) (switch-to-buffer "large_file") (emacs-lisp-mode) (setq parse-sexp-lookup-properties nil old-time (current-time)) (goto-char (point-max)) (setq state (syntax-ppss (point)) time-diff (time-subtract (current-time) old-time)))) (pp state) time-diff) -| (0 nil 213444184 nil nil nil 0 nil nil nil) => (0 25 897448) (let (time-diff state) (save-window-excursion (let (old-time) (switch-to-buffer "large_file") (emacs-lisp-mode) (setq parse-sexp-lookup-properties t old-time (current-time)) (goto-char (point-max)) (setq state (syntax-ppss (point)) time-diff (time-subtract (current-time) old-time)))) (pp state) time-diff) -| (0 nil nil nil t nil 0 nil 1 nil) => (0 20 48766) I surprisedly found that it is faster of setting `parse-sexp-lookup-properties' to t than setting it to nil. Regards, Guanpeng Xu _________________________________________________________________Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
[Prev in Thread] | Current Thread | [Next in Thread] |