A bit a late reply, but it may be useful for someone later-on.
I recently had the exact same issue, quite suddenly, things started to become slow.
Here's what I did to solve it:
First thing to do: make a backup of your project!
Second thing to do is to vacuum your db, which does some optimizations that gets rid of some garbage in your db.
You can just do: db.executesql('VACUUM')
Third thing you can do is to:
0) Make sure all your tables have a uuid field
1) Export all your data to a csv file:
with open('somefile.csv', 'wb') as dumpfile:
db.export_to_csv_file(dumpfile)
2) Remove your db tables
3) Import again all your data from the csv file:
with open('somefile.csv', 'rb') as dumpfile:
db.import_from_csv_file(dumpfile, id_map={})
In my case the export/import of the data finally did the trick.
I'm still not sure why this seems to speed up everything, maybe someone in this forum here has a good explanation for that?
Hope it works for you too!