tsgates / pylookup

Emacs mode for searching python documents with convenience
http://taesoo.org/Opensource/Pylookup
114 stars 28 forks source link

Use cPickle if possible. It's ~4 times faster. #13

Closed tkf closed 12 years ago

tkf commented 12 years ago

Old version:

./pylookup.py -l ljust  0.89s user 0.02s system 99% cpu 0.917 total
./pylookup.py -l ljust  0.88s user 0.02s system 99% cpu 0.912 total

This patch:

./pylookup.py -l ljust  0.22s user 0.02s system 97% cpu 0.241 total
./pylookup.py -l ljust  0.22s user 0.01s system 98% cpu 0.235 total

Maybe it is good idea to rewrite search backend... I think calling pickle.load once, instead of more than 10,000 times would be better.

tsgates commented 12 years ago

Thank you so much!

On Sun, Dec 04, 2011 at 03:01:29AM -0800, tkf wrote:

Old version:

./pylookup.py -l ljust  0.89s user 0.02s system 99% cpu 0.917 total
./pylookup.py -l ljust  0.88s user 0.02s system 99% cpu 0.912 total

This patch:

./pylookup.py -l ljust  0.22s user 0.02s system 97% cpu 0.241 total
./pylookup.py -l ljust  0.22s user 0.01s system 98% cpu 0.235 total

Maybe it is good idea to rewrite search backend... I think calling pickle.load once, instead of more than 10,000 times would be better.

You can merge this Pull Request by running:

git pull https://github.com/tkf/pylookup master

Or you can view, comment on it, or merge it online at:

https://github.com/tsgates/pylookup/pull/13

-- Commit Summary --

  • Use cPickle if possible

-- File Changes --

M pylookup.py (5)

-- Patch Links --

https://github.com/tsgates/pylookup/pull/13.patch https://github.com/tsgates/pylookup/pull/13.diff


Reply to this email directly or view it on GitHub: https://github.com/tsgates/pylookup/pull/13