Skip to content

Commit

Permalink
Revert "perf: desperate attempts to unlink output arrays"
Browse files Browse the repository at this point in the history
This reverts commit 6c80227.
  • Loading branch information
jpivarski committed Sep 25, 2024
1 parent 6c80227 commit c0786a4
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions src/uproot/behaviors/TBranch.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,10 @@ def iterate(
arrays, report = item
arrays = library.global_index(arrays, global_offset)
report = report.to_global(global_offset)
popper = [arrays]
del arrays
yield popper.pop(), report

yield arrays, report
else:
popper = [library.global_index(item, global_offset)]
yield popper.pop()

arrays = library.global_index(item, global_offset)
yield arrays
except uproot.exceptions.KeyInFileError:
if allow_missing:
continue
Expand Down Expand Up @@ -1115,9 +1111,6 @@ def iterate(
ak_add_doc,
)

# no longer needed; save memory
del output

next_baskets = {}
for branch, basket_num, basket in ranges_or_baskets:
basket_entry_start, basket_entry_stop = basket.entry_start_stop
Expand All @@ -1126,14 +1119,10 @@ def iterate(

previous_baskets = next_baskets

# no longer needed; save memory
popper = [out]
del out

if report:
yield popper.pop(), Report(self, sub_entry_start, sub_entry_stop)
yield out, Report(self, sub_entry_start, sub_entry_stop)
else:
yield popper.pop()
yield out

def keys(
self,
Expand Down

0 comments on commit c0786a4

Please sign in to comment.