objgraph.show_growth() doesn't notice numpy arrays (and other non-GC-tracked types)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 840
- Forks
- 72
- PR merge metrics
- No merged PRs in 30d
Description
See this code:
``` python
import objgraph
import numpy as np
objgraph.show_growth()
j = 20
y = []
for i in range(5):
for l in range(j):
y.append(np.array([np.random.randint(500),np.random.randint(500)]))
print 'i:',i
objgraph.show_growth()
print '___'
#objgraph.show_most_common_types(limit=100)
j += 1
```
the result is:
```
function 2973 +2973
wrapper_descriptor 1584 +1584
builtin_function_or_method 873 +873
dict 867 +867
method_descriptor 823 +823
weakref 622 +622
tuple 518 +518
getset_descriptor 514 +514
list 422 +422
member_descriptor 223 +223
i: 0
wrapper_descriptor 1593 +9
getset_descriptor 518 +4
member_descriptor 226 +3
list 424 +2
weakref 624 +2
dict 869 +2
listiterator 1 +1
___
i: 1
wrapper_descriptor 1596 +3
weakref 625 +1
dict 870 +1
method_descriptor 824 +1
___
i: 2
___
i: 3
___
i: 4
___
```
for the 2,3 and 4 epoch, it shows nothing growing. But it should show that the number of numpy.array grows
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the Python reproduction in the issue and inspect the objgraph.show_growth() entry point. Compare how it counts ordinary objects with how NumPy arrays and other non-GC-tracked types are handled. Done means repeated array allocations appear as growth in the reported output without breaking existing object counts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100