Memory management issues #648
-
Hey, sorry I'm new to uproot and I'm struggling with how to properly extract what I need from root files and also manage the memory being allocated. Here's what I've been trying to make work, however the ram usage will just increase with every iteration until my computer crashes.
Here I've tried deleting and garbage collecting but I'm guessing that the root_file is keeping a reference to the loaded arrays so this doesn't work. I was hoping someone could tell me the proper way to do this. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
I did find one work around which is just reversing the order of the for loop and the with statement but is there a more proper way of doing this? |
Beta Was this translation helpful? Give feedback.
-
Since uproot.lazy is deprecated I found that setting object_cache=None in uproot.open() solved my problems and was the simplest solution |
Beta Was this translation helpful? Give feedback.
Since uproot.lazy is deprecated I found that setting object_cache=None in uproot.open() solved my problems and was the simplest solution