Re: [pysqlite] unusual memory behavior
Damien Elmes <resolve-5m3Em/[email protected]> Sat, 30 May 2009 16:47:09 +0900
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <[email protected]> |
I'm having some trouble with 0.5.x probably due to some previously bad assumptions on my part. Once I get the latest 0.5.x branch working, if I still observe the problems I'll report it to trac. On Sat, May 30, 2009 at 12:28 AM, Michael Bayer <[email protected]> wrote: > Damien Elmes wrote: >> Do these SQLAlchemy tests also cover the case of opening many separate >> SQLite databases that I mentioned on IRC a few months ago? > > was there a trac ticket with a test case posted ? > > > >> >> On Fri, May 29, 2009 at 2:01 AM, Michael Bayer <[email protected]> >> wrote: >>> Gerhard H=E4ring wrote: >>>> Internally, pysqlite has these objects: connections, cursors and >>>> statements. Connections need to have access to all cursors and >>>> statements ever created on them. So, the connection object has a *list* >>>> of weak references for cursors, and a *list* of weak references for >>>> statements. To keep things simple and efficient, this list is only ever >>>> appended to. The connection object has also two members >>>> created_statements and created_cursors that counts the number of >>>> statement and cursor allocations. >>>> >>>> If created_statements or created_cursors reaches 200, the corresponding >>>> list is scanned for weak references that have unreachable objects (i. >>>> e. >>>> that were del-ed or removed by the gc). The list is then compacted to >>>> not contain any NULLs. And the counter member is reset to zero. >>> >>> >>> thats great, since it looked like there was some internal memory >>> management routine causing this to happen, and I was just curious if it >>> was known. >>> _______________________________________________ >>> list-pysqlite mailing list >>> list-pysqlite-FR6EJeJVuqdwc357pe9rcyQmJico6nz3epZhswDD4dQ@public.gmane.org >>> http://itsystementwicklung.de/cgi-bin/mailman/listinfo/list-pysqlite >>> >> _______________________________________________ >> list-pysqlite mailing list >> list-pysqlite-FR6EJeJVuqdwc357pe9rcyQmJico6nz3epZhswDD4dQ@public.gmane.org >> http://itsystementwicklung.de/cgi-bin/mailman/listinfo/list-pysqlite >> > > _______________________________________________ > list-pysqlite mailing list > list-pysqlite-FR6EJeJVuqdwc357pe9rcyQmJico6nz3epZhswDD4dQ@public.gmane.org > http://itsystementwicklung.de/cgi-bin/mailman/listinfo/list-pysqlite >