0.8.8
All array types have an nbytes
parameter, which determines eviction from uproot's ArrayCache
. Without this parameter, the cache would fill up to a billion arrays rather than a billion bytes!
The nbytes
parameter only counts data in arrays, not the Python objects that support those arrays (which differs between Pythons 2 and 3, and PyPy doesn't track), and it doesn't track ephemeral attributes, even if they are arrays (like JaggedArray._counts
, which only exists after the first time JaggedArray.counts
is requested). It also doesn't make a distinction between owned data and not-owned data, so views would be double-counted.
The nbytes
algorithm always halts, even if structures have cyclic references (if x.content is x
, the nbytes
of x
are not double-counted and do not lead to infinite recursion).