[Top][All Lists]

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

speeding up json.el

From: T. V. Raman
Subject: speeding up json.el
Date: Sun, 5 Oct 2008 15:26:00 -0700

Along the same lines as  th recently checkee in speed-up to
xml.el, json.el could  be sped up by using  syntax classes to
advantage. As a simple example:
At present:;

(defun json-skip-whitespace ()
  "Skip past the whitespace at point."
  (while (looking-at "[\t\r\n\f\b ]")
    (goto-char (match-end 0))))

replace with (skip-syntax-forward " ")

We could also get more aggressive by introducing a json grammar
specific syntax table, and using partial-parse-sexp  and friends
if needed.

Best Regards,

Email:  address@hidden
WWW:    http://emacspeak.sf.net/raman/
AIM:    emacspeak       GTalk: address@hidden
PGP:    http://emacspeak.sf.net/raman/raman-almaden.asc
Google: tv+raman 
IRC:    irc://irc.freenode.net/#emacs

reply via email to

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