-
Notifications
You must be signed in to change notification settings - Fork 537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
increasingly slow searches #49
Comments
The smart cache only caches the same query- i.e. if the name argument passed to tiny_db.locate is always some constant. I don't see why you would hit any performance issues... can you inspect the live table's |
@daftscience: You're definitely pushing limits here. With 10k elements you should at least consider moving to a more serious database that TinyDB. |
Found the offender. Basically, @daftscience Can you confirm this is fixed in the latest development version? |
Works like a charm. Thanks for the quick response. |
I've now finally released v2.3.0 which includes a fix for this :) |
I've run into an issue where searching gets slower over time. I know I may be pushing this TinyDB to it's performance limits. I have a database of around 10k dicts. Each Dict has five items.
So, Here is some psuedo code
Every time I call
tiny_db.locate(name)
it takes 1 second longer than it did the last time I called. it.I am probably doing something horribly wrong, Im not entirely sure how the caching middleware works, my grasp of python is pretty weak.
My duct tape fix has been to copy the db into a variable when my class initializes. I'm using that to search. But, I have to insert new items into both. I feel like there may be a better solution.
Sorry for the amateurish question, but thanks in advance.
The text was updated successfully, but these errors were encountered: