EDITED: the post below shows the problem more clear.
it takes 0.16 s to read 4 branches (colunms)
and 2400 s when 16 branches (columns) are read
Would anyone guess of the origin of such behavior
I should be able to provide the root file for testing in spirit of that
https://github.com/JuliaHEP/UpROOT.jl/pull/8#issuecomment-606596770
The file has 300_000 rows, the size of 10MB
Some more retails are below
the Particle
is a simple mutable struct, the process
function creates a named tuple of for particles
using UpROOT
using Parameters
#
@with_kw mutable struct Particle
E::Float64
px::Float64
py::Float64
pz::Float64
end
#
process(row) =
(pb=Particle(
px = row.pBeamX,
py = row.pBeamY,
pz = row.pBeamZ,
E = row.pBeamE),
pr = Particle(
px = row.pRecoilX,
py = row.pRecoilY,
pz = row.pRecoilZ,
E = row.pRecoilE),
pπ = Particle(
px = row.pPimX,
py = row.pPimY,
pz = row.pPimZ,
E = row.pPimE),
pη = Particle(
px = row.pEtaX,
py = row.pEtaY,
pz = row.pEtaZ,
E = row.pEtaE))