Open jrubinator opened 5 years ago
How very thorough of you, I appreciate this a bunch.
Unfortunately, I didn't finish my rewrite of pokebase
before heading off to school, and I currently don't have the time to support it.
I believe I intended to try out a few caching methods. The old json tree was too complex in my opinion. Currently pokebase
is using the shelve
module, which I chose for its simplicity. Unfortunately, it is slower, as you have pointed out. I was planning on moving away from shelve
, as it presented the difficulty of behaving differently on different platforms.
My next idea was to try some form of SQL (mysql
?), but I didn't get the chance to try it out. If you're up to it, I'd be very interested in a pull request with a better caching algorithm/hard disk representation.
I was looking at the current state of the refactor, and noticed that there's a significant performance drop off (about an order of magnitude) from the changes.
Namely, once the cache is set, retrieving a pokemon takes an order of magnitude longer (jumping from taking ~.25s to ~3s).
Originally posted by @jrubinator in https://github.com/GregHilmes/pokebase/issues/10#issuecomment-414134798