[issue10725] Better cache instrumentation

2010-12-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: Closed due to lack of interest. -- resolution: -> rejected status: open -> closed ___ Python tracker ___ __

[issue10725] Better cache instrumentation

2010-12-17 Thread Nick Coghlan
Nick Coghlan added the comment: Indeed, getsizeof() on containers only gives the amount of memory consumed by the container itself (this can be difficult to figure out externally for potentially sparse containers like dicts), but leaves the question of the size of the referenced objects open.

[issue10725] Better cache instrumentation

2010-12-17 Thread Raymond Hettinger
Changes by Raymond Hettinger : Removed file: http://bugs.python.org/file20095/sized_cache2.diff ___ Python tracker ___ ___ Python-bugs-list ma

[issue10725] Better cache instrumentation

2010-12-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Updated to use ABCs but still relies on user objects implementing > __sizeof__. So it is accurate whenever sys.getsizeof() is accurate. I'm really -1 on this. It's better to give no measurement than to give a totally wrong indication. The fact that you had t

[issue10725] Better cache instrumentation

2010-12-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: Another thing to work out: not double counting duplicate objects: [1000, 2000, 3000] is bigger than [None, None, None] -- priority: normal -> low ___ Python tracker

[issue10725] Better cache instrumentation

2010-12-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: Updated to use ABCs but still relies on user objects implementing __sizeof__. So it is accurate whenever sys.getsizeof() is accurate. -- Added file: http://bugs.python.org/file20095/sized_cache2.diff ___ Python

[issue10725] Better cache instrumentation

2010-12-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: The _total_size thing looks like a wildly bad idea to me, since it's so poorly defined (and relying on a couple of special cases). Also, "currsize" is quite bizarre. Why not simply "size"? -- nosy: +pitrou ___ Pyth

[issue10725] Better cache instrumentation

2010-12-17 Thread Raymond Hettinger
New submission from Raymond Hettinger : Nick, can you look at this? -- assignee: ncoghlan components: Library (Lib) files: sized_cache.diff keywords: patch messages: 124194 nosy: ncoghlan, rhettinger priority: normal severity: normal status: open title: Better cache instrumentation type: