Hello again,
I am constructing the final benchmarking plots for the discussed issue, and one thing started to puzzle me. I thought that ROOT has to read the whole branch, and thus the whole 2D array, for a specific entry. Thus reading a single value from the array across all entries would be roughly equal to reading the whole array across all the entries, if I/O is the dominant factor. I am not sure that is the case.
entries = t.Draw("traces[100].SimSignal_X", "", "goff")
takes roughly 0.93 seconds (there are 1001 entries, and the traces.SimSignal_X array, while changing is roughly 180x1000 (180 traces, each 1000 long)) and returns 1005156 entries (~1000 entries * 1000 length of a trace[100]).
entries = t.Draw("traces[100].SimSignal_X", "Entry$==499", "goff")
takes roughly 0.86 s and returns 1006 entries (the length of the trace[100] for Entry$==499.
The times are roughly equal. If reading a single value from traces.SimSignal_X required reading all values of traces.SimSignal_X (all traces, whole length, roughly 180*1000), then The first case should be roughly ~1000 times longer than the second case. In the second case we read traces.SimSignal_X just for a single entry, in the first case for all ~1000 entries. But this is not the case.
The times are also not proportional to the number of entries: 1005156 in the first case, 1006 in the second.
Reading all traces instead of traces[100] for a single entry almost does not affect time (so I guess all traces are read always, as expected), however reading all traces through all entries:
entries = t.Draw("traces.SimSignal_X", "", "goff")
takes ~40 seconds, ~50 times longer then just traces[100].
There is no compression in this file, so I don’t know what is happening.
I would expect reading traces.SimSignal_X through all Entries to take the same amount of time as reading traces[100].SimSignal_X, because all the traces are always read (or so I thought). Simultaneously, I would expect a single entry to be read ~1000 times faster than all the entries. Both cases are false. Could you suggest what is happening?