Make sqlite performance a bit better in the warningstep, hopefully.
authorBenjamin Smedberg <benjamin@smedbergs.us>
Fri, 09 Jan 2009 15:28:13 -0500
changeset 14 93ae8501dda9
parent 13 e352aa637c0d
child 15 d69fbc98c3ea
push id7
push userbsmedberg@mozilla.com
push dateFri, 09 Jan 2009 20:28:25 +0000
Make sqlite performance a bit better in the warningstep, hopefully.
warningstep.py
--- a/warningstep.py
+++ b/warningstep.py
@@ -59,16 +59,18 @@ class WarningParserStep(ShellCommand):
         createSchema = not os.path.exists(self.dbfile)
 
         db = sqlite3.connect(self.dbfile)
         cur = db.cursor()
 
         if createSchema:
             cur.executescript(self._createSchema)
 
+        cur.execute('PRAGMA synchronous = NORMAL');
+
         buildnumber = self.getProperty('buildnumber')
 
         cur.execute('INSERT INTO builds (buildnumber, rev) VALUES ( ?, ? )',
                     (buildnumber, self.getProperty('got_revision')))
 
         def lineSignature(line):
             """
             Given a line tuple, return a string signature for the line. This signature is based