[issue3104] overzealous garbage collector (dict)

2008-07-20 Thread Georg Brandl

Georg Brandl [EMAIL PROTECTED] added the comment:

No complaints were voiced, so I'm closing this.

--
status: pending - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3104
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3104] overzealous garbage collector (dict)

2008-06-14 Thread Paul Melis

Paul Melis [EMAIL PROTECTED] added the comment:

The script is still not a test case, as it doesn't *demonstrate* the
problem when run. You need to provide more information for this to be
reproducable by others. 

- what exact input did you use? (e.g. include the IRC log file on which
you claim a bug is exposed)
- what output/behaviour did you expect for the given input?
- how was the actual output/behaviour different from what was expected?

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3104
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3104] overzealous garbage collector (dict)

2008-06-14 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

 The original text file was an IRC log. Shoving Charles Dickens' Great
 Expectations 17 times in a text file and then parsing it doesn't show
 this problem for some weird reason.

I'd say the weird reason is probably a bug in your script. For example
the following appears very dubious:

for o in self.wlist:
if len(o)  0xFF:
o = o[:0xFF]
fp.write(chr(len(o)))
fp.write(o)
for s in self.wlist[o]:

In any case, the idea that one of Python's built-in containers would
silently *drop* values (rather than segfault or produce a MemoryError)
is in itself quite unbelievable, due to the way those containers funciton.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3104
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3104] overzealous garbage collector (dict)

2008-06-13 Thread GreaseMonkey

New submission from GreaseMonkey [EMAIL PROTECTED]:

When filled with a massive database (16MB, i'm not sure how large it's
meant to be), the dict object appears to mysteriously drop objects off
the face of the earth (in this case list objects). Wouldn't it be more
appropriate to splurt out a memory error rather than fail silently only
to screw up in another way?

--
components: Interpreter Core
messages: 68142
nosy: GreaseMonkey
severity: normal
status: open
title: overzealous garbage collector (dict)
type: behavior
versions: Python 2.5

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3104
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3104] overzealous garbage collector (dict)

2008-06-13 Thread Paul Melis

Paul Melis [EMAIL PROTECTED] added the comment:

What do you mean with 16MB? Is that the total size of all data held
by the dictionary (and if so, how did you measure this)? How many keys
are in the dictionary? And what indication do you have that elements are
being dropped?

--
nosy: +paulmelis

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3104
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3104] overzealous garbage collector (dict)

2008-06-13 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

Are you sure the keys for those list objects aren't just equal to others
you insert in the dict?

Witness:

 d = {}
 d[1] = 'a'
 d
{1: 'a'}
 d[1.0] = 'b'
 d
{1: 'b'}

I'm not sure what the memory limit is for dict objects, but 16MB sounds
quite low.

--
nosy: +pitrou

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3104
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3104] overzealous garbage collector (dict)

2008-06-13 Thread Georg Brandl

Georg Brandl [EMAIL PROTECTED] added the comment:

You'll have to produce a test case for this dropping -- otherwise I
don't believe that 16 MB cause *any* memory problems at all.

--
nosy: +georg.brandl
status: open - pending

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3104
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3104] overzealous garbage collector (dict)

2008-06-13 Thread GreaseMonkey

GreaseMonkey [EMAIL PROTECTED] added the comment:

I mean that it actually *drops* values, not *overwrites* them.

I have attached the script which demonstrates this quirk in the garbage
collector (it also doubles as a library).

The original text file was an IRC log. Shoving Charles Dickens' Great
Expectations 17 times in a text file and then parsing it doesn't show
this problem for some weird reason.

I have python 2.5.1.

Added file: http://bugs.python.org/file10628/markov.py

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3104
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com