scikit-hep / uproot5

ROOT I/O in pure Python and NumPy.
https://uproot.readthedocs.io
BSD 3-Clause "New" or "Revised" License
242 stars 76 forks source link

Slow loading of file into arrays. #1314

Open JoyYTZhou opened 1 month ago

JoyYTZhou commented 1 month ago

Hi all,

I've recently experienced an issue with uproot.open('someNANOAOD12.root:Events').arrays(lib='ak'). The file I am experimenting with only has 680 entries and a size of 4.053MB. I am timing only the operation of getting the arrays for the tree object, and it takes 20.8 seconds.

I never had such issues before with much larger files with some older version of uproot (I think it was still 5 but a particular release). I am now using version 5.4.1. I am not sure if it's an issue with uproot or awkward. I am leaning toward it being an uproot error since I've had my awkward version fixed in virtual env.

Any help would be appreciated!

nikoladze commented 4 weeks ago

680 entries does not immediately sound like it would be affected by this, but maybe you can check if #1320 fixes your issue. You can also check if using uproot.open(..., handler=uproot.MemmapSource) (for versions before that #1320) improves your performance.