unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* speeding up json.el
@ 2008-10-05 22:26 T. V. Raman
  0 siblings, 0 replies; only message in thread
From: T. V. Raman @ 2008-10-05 22:26 UTC (permalink / raw)
  To: emacs-devel

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,
--raman

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




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-10-05 22:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-05 22:26 speeding up json.el T. V. Raman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).