RDataFrame performance for branch reduction and event filtering (slimming and skimming)

Hi Aleksandr,

I took a look at the reproducer you shared and could not see anything out of the ordinary. As I mentioned RDF has some overhead on top of rootreadspeed, and then on top of that the RDF slimming simply does more than rootreadspeed: it doesn’t only read but it also processes data and writes it out again. Also at least in this case writing actually takes longer than reading, and most of the writing time is spent compressing the data, so you can speed up the slimming by picking a faster compression algorithm, e.g. adding opts.fCompressionAlgorithm = ROOT.ECompressionAlgorithm.kZSTD to the snapshot options I see runtimes go down from ~30s to ~20s.

Cheers,
Enrico

P.S.
I would be curious to know what kind of speed-up using root:// instead of /eos gives you :smiley: