-
I just started playing with uproot because it seems so useful, however, I wanted to know if there is a way to apply multithreading functionalities to my script because it is much slower than using RDataframe, or if its better to just read the data a generate the histograms using RDataframe and then plot with uproot. Thanks all for your time :) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
A detailed description is here: https://uproot.readthedocs.io/en/latest/basic.html#parallel-processing Unless your workflow is dominated by decompression, parallelization is not likely to accelerate it much because of Python's Global Interpreter Lock (GIL). That's why Coffea analyses usually parallelize by distributing among Python processes, rather than threads. Uproot also doesn't do the plotting itself—the idea is that it's exclusively an I/O library—that's passed to hist, mplhep, Matplotlib, etc. If you're using RDataFrame for the bulk processing, you might find it easier to go directly to one of those libraries, rather than involving Uproot. |
Beta Was this translation helpful? Give feedback.
-
Got it, thanks for the fast response @jpivarski |
Beta Was this translation helpful? Give feedback.
A detailed description is here: https://uproot.readthedocs.io/en/latest/basic.html#parallel-processing
Unless your workflow is dominated by decompression, parallelization is not likely to accelerate it much because of Python's Global Interpreter Lock (GIL). That's why Coffea analyses usually parallelize by distributing among Python processes, rather than threads.
Uproot also doesn't do the plotting itself—the idea is that it's exclusively an I/O library—that's passed to hist, mplhep, Matplotlib, etc. If you're using RDataFrame for the bulk processing, you might find it easier to go directly to one of those libraries, rather than involving Uproot.