bbappserver / hydrus-userpatch

Community patches for Hydrus, a personal booru-style media tagger that can import files and tags from your hard drive and popular websites. Content can be shared with other users via user-run servers.
http://hydrusnetwork.github.io/hydrus/
Do What The F*ck You Want To Public License
0 stars 0 forks source link

Multiple SQL statements should be in deferred transactions #2

Open bbappserver opened 5 years ago

bbappserver commented 5 years ago

SQLITE must always open a transaction to change the database and this has overhead. Items in https://github.com/bbappserver/hydrus-userpatch/blob/develop/include/ClientDB.py would be faster if successive executes were wrapped in BEGIN. As a transaction would not have to be opened and closed every time. Don't worry, SQLITE already deals with read concurrency.