|
Post by meerkat on Nov 28, 2008 2:29:22 GMT -5
Not sure this is a bug, but the memory usage of RBP101 continues to rise. Maybe this is normal. Just looked at the processes using XP and rbp.exe is sitting at 334,780K. Each time I test my program it gets larger.
I'm using in-memory SQLite talbes. I have a feeling that it does not re-use space created for the in-memory SQLite tables. Each time I test, I think it allocates space for the tables again.
|
|
|
Post by StefanPendl on Nov 28, 2008 6:13:37 GMT -5
This might be due to SQLite, did you check the SQLite site for bug report regarding this
|
|
|
Post by Carl Gundel - admin on Nov 28, 2008 10:15:15 GMT -5
Are you sure you're disconnecting for every time you connect?
-Carl
|
|
|
Post by meerkat on Nov 28, 2008 10:57:37 GMT -5
It will not let you disconnect a in-memory DB. May be a SQLite thing.
Anyway, since it's in memory, only the session that creates the DB is using it. So they probably assume there is no need to disconnect.
I'll check SQLite for any issues for freeing up memory.
|
|
|
Post by meerkat on Nov 30, 2008 11:14:33 GMT -5
I changed my program to use SQLite disk files instead of memory files.
The memory usage still continues to increase. It hasn't been a problem for me, but I thought I should point it out.
I checked the connect and disconnect and they all match up. I use two connections to the database.
The program is rather complex and is database I/O intensive. It does several SQL operations before disconnecting. It goes through the DB about 50 times using different sorts, and looking for different things. I wonder if it should be disconnected after each SQL. Seems like a lot of disconnects and connects would be slow...
|
|
|
Post by carlgundel on Nov 30, 2008 12:52:33 GMT -5
I changed my program to use SQLite disk files instead of memory files. The memory usage still continues to increase. It hasn't been a problem for me, but I thought I should point it out. I checked the connect and disconnect and they all match up. I use two connections to the database. The program is rather complex and is database I/O intensive. It does several SQL operations before disconnecting. It goes through the DB about 50 times using different sorts, and looking for different things. I wonder if it should be disconnected after each SQL. Seems like a lot of disconnects and connects would be slow... Connecting and disconnecting is not slow. You should try it to see if it makes any difference. Is it possible that your code has some sort of memory leak that is unrelated to SQLite? -Carl
|
|
|
Post by meerkat on Nov 30, 2008 13:35:40 GMT -5
Hmmmm! Was able to isolate it. But don't know why? The system goes through the database and updates records it finds with another connection. This increases Memory Usage. And it never gets it back after the disconnect. sqliteconnect #sql, db$ ' Connect sql sqliteconnect #sqlA, db$ ' Connect sqlA #sql execute("SELECT * FROM test")
WHILE #sql finds records it updates them using connection sqlA
#sqlA execute("UPDATE test .....WHERE......")
WEND #sql disconnect() #sqlA disconnect()
This does not increase memory sqliteconnect #sql, db$ ' Connect sql #sql execute("SELECT * FROM test")
WHILE #sql finds records it updates them using connection sqlA
sqliteconnect #sqlA, db$ ' Connect sqlA #sqlA execute("UPDATE test ........") #sqlA disconnect()
WEND #sql disconnect()
I couldn't find anything on this in the SQLite docs.
|
|