Great improvement. I'll test it out and check it in if it seems to work.
Suraj Acharya <[EMAIL PROTECTED]> writes: > The following definition of jde-xref-unpickle-hash loads the cached data much > faster. For me it went > from about 5 seconds to being almost instantaneous. > > I adapted the buffer code from http://www.cogsci.ed.ac.uk/~stephen/ell.el > > > (defun jde-xref-unpickle-hash (hash filename) > "Populate a hash created by loading the contents of FILENAME to HASH. > FILENAME must be created by `jde-xref-pickle-hash'" > (unless (file-exists-p filename) > (error (concat "Cannot unpickle - file " filename " does not exist. " > "The xref database may need to be recreated."))) > (dolist (item (with-temp-buffer > (insert-file-contents-literally filename) > (read (current-buffer)))) > (puthash (car item) (cdr item) hash)))