memory-leak in pysqlite 2.3.0 ?

M

Michael Husmann

After upgrading from pysqlite 2.0.5 to pysqlite 2.3.0 writing into a
sqlite database increases memory consumption heavily. A similar program
with Ruby and sqlite-ruby 1.1.0 does not affect memory consumption at
all.

Here a short example:
-------------------------------
#!/usr/bin/env python

import os
from pysqlite2 import dbapi2
print dbapi2.version

db = dbapi2.connect("bla.db")
c = db.cursor()

c.execute("create table b (c integer)")

for i in xrange(10000000):
c.execute("insert into b values (%d)" % i)

----------------------------------

System in use:
Python 2.4.1, Sqlite3 3.3.6, Pysqlite 2.3.0

Regards,
Michael
 
M

Marc 'BlackJack' Rintsch

Michael Husmann said:
After upgrading from pysqlite 2.0.5 to pysqlite 2.3.0 writing into a
sqlite database increases memory consumption heavily. […]

Here a short example:
-------------------------------
#!/usr/bin/env python

import os
from pysqlite2 import dbapi2
print dbapi2.version

db = dbapi2.connect("bla.db")
c = db.cursor()

c.execute("create table b (c integer)")

for i in xrange(10000000):
c.execute("insert into b values (%d)" % i)

Just a guess: Commit the changes from time to time.

Ciao,
Marc 'BlackJack' Rintsch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,121
Latest member
LowellMcGu
Top