RESOLVED FIXED 38972
Do not check if a database needs to be vacuumed after read-only transactions
https://bugs.webkit.org/show_bug.cgi?id=38972
Summary Do not check if a database needs to be vacuumed after read-only transactions
Dumitru Daniliuc
Reported 2010-05-11 22:32:14 PDT
Read-only transactions don't change the state of the database. Therefore, there's no point in checking if a database needs to be vacuumed after such a transaction. Checking if a database needs to be vacuumed involves calling 'PRAGMA freelist_count' and 'PRAGMA max_page_count', which adds an unnecessary overhead.
Attachments
patch (1.39 KB, patch)
2010-05-11 22:53 PDT, Dumitru Daniliuc
dglazkov: review+
dumi: commit-queue-
Dumitru Daniliuc
Comment 1 2010-05-11 22:53:35 PDT
Dimitri Glazkov (Google)
Comment 2 2010-05-12 08:46:39 PDT
Comment on attachment 55809 [details] patch ok.
Michael Nordman
Comment 3 2010-05-12 11:39:18 PDT
Does this put a dent in the perf regression? Just checking. Consider putting the call to vacuumIfNeeded() in the block that runs for transactions that actually mutated something to limit how often we do this function even further (ala, don't do it for 'write' transactions that didn't really write anything). // The commit was successful, notify the delegates if the transaction modified this database if (m_modifiedDatabase) { m_database->incrementalVacuumIfNeeded(); m_database->transactionClient()->didCommitTransaction(this); }
Dumitru Daniliuc
Comment 4 2010-05-12 13:43:10 PDT
(In reply to comment #3) > Does this put a dent in the perf regression? Just checking. > > Consider putting the call to vacuumIfNeeded() in the block that runs for transactions that actually mutated something to limit how often we do this function even further (ala, don't do it for 'write' transactions that didn't really write anything). > > // The commit was successful, notify the delegates if the transaction modified this database > if (m_modifiedDatabase) { > m_database->incrementalVacuumIfNeeded(); > m_database->transactionClient()->didCommitTransaction(this); > } done.
Dumitru Daniliuc
Comment 5 2010-05-12 14:08:43 PDT
Landed as r59267.
Note You need to log in before you can comment on or make changes to this bug.