[issue11257] asyncore stores unnecessary object references

2011-03-15 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- resolution: -> wont fix status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue11257] asyncore stores unnecessary object references

2011-03-15 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Closing out as per msg128969. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue11257] asyncore stores unnecessary object references

2011-02-26 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Unless there's a way to automatically call close() when a dispatcher instance is no longer referenced (and I can't think of anything to do that) I'd say we better close this as rejected. -- ___ Python tracker <

[issue11257] asyncore stores unnecessary object references

2011-02-25 Thread Éric Araujo
Éric Araujo added the comment: Oh, I guess I didn’t understand at all what the numbers meant. I shouldn’t have compared the values and assumed that less was better, my bad. -- ___ Python tracker

[issue11257] asyncore stores unnecessary object references

2011-02-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Éric, the weak dicts are implemented in pure Python while built-in dicts are in C. That can make quite a difference. -- nosy: +pitrou ___ Python tracker _

[issue11257] asyncore stores unnecessary object references

2011-02-25 Thread Éric Araujo
Éric Araujo added the comment: WeakValue* -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue11257] asyncore stores unnecessary object references

2011-02-25 Thread Éric Araujo
Éric Araujo added the comment: Well, isn’t WeakRefDictionary faster than a dict here? -- nosy: +eric.araujo stage: -> patch review type: behavior -> performance versions: -Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker

[issue11257] asyncore stores unnecessary object references

2011-02-21 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I'd be fine with this. My only concern are performances. I've tried this: http://code.google.com/p/pyftpdlib/issues/attachmentText?id=152&aid=-7106494857544071944&name=bench.py&token=bd350bbd6909c7c2a70da55db15d24ed Results: plain dict: 722.26 Mb/sec WeakVa

[issue11257] asyncore stores unnecessary object references

2011-02-20 Thread Марк Коренберг
Марк Коренберг added the comment: sorry, forgot "import weakref" -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue11257] asyncore stores unnecessary object references

2011-02-20 Thread Марк Коренберг
Марк Коренберг added the comment: --- asyncore.py 2010-09-15 22:18:21.0 +0600 +++ asyncore.py 2011-02-21 09:43:15.033839614 +0500 @@ -58,7 +58,7 @@ try: socket_map except NameError: -socket_map = {} +socket_map = weakref.WeakValueDictionary() def _strerror(err): tr

[issue11257] asyncore stores unnecessary object references

2011-02-20 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > Such code should be rewritten via weakref. Can you write a patch? -- ___ Python tracker ___ _

[issue11257] asyncore stores unnecessary object references

2011-02-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> giampaolo.rodola nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mail

[issue11257] asyncore stores unnecessary object references

2011-02-20 Thread Марк Коренберг
New submission from Марк Коренберг : asyncore.py: --- def add_channel(self, map=None): #self.log_info('adding channel %s' % self) if map is None: map = self._map map[self._fileno] = self - As we see, it add itself to a map, creating unneces