Suitability for long-running text processing?
arkanes at gmail.com
Mon Jan 8 18:27:54 CET 2007
On 1/8/07, tsuraan <tsuraan at gmail.com> wrote:
> > My first thought was that interned strings were causing the growth,
> > but that doesn't seem to be the case.
> Interned strings, as of 2.3, are no longer immortal, right? The intern doc
> says you have to keep a reference around to the string now, anyhow. I
> really wish I could find that thing I read a year and a half ago about
> python never collecting small strings, but I just can't find it anymore.
> Maybe it's time for me to go source diving...
I remember something about it coming up in some of the discussions of
free lists and better behavior in this regard in 2.5, but I don't
remember the details.
Interned strings aren't supposed to be immortal, these strings
shouldn't be automatically interned anyway (and my brief testing
seemed to bear that out) and calling _Py_ReleaseInternedStrings didn't
recover any memory, so I'm pretty sure interning is not the culprit.
More information about the Python-list