TTree::Draw draw time

I have a TTree with branches such as scale, frameno, id (and some more). I want to extract scale vector for each id. Therefore in a loop for each id I do:

lcn = t.Draw("scale:frame", "id=="+str(id)+" && frameno<1700", "goff")
something = t.GetV1()

The problem is, that the time to execute all the draws does not gorw lineary with the number of ids, and therefore becomes really large for many ids.

Is it normal? And then, if it is, is there any way to improve the speed of this procedure?

[quote] that the time to execute all the draws does not gorw lineary with the number of ids[/quote]You might be running out of memory if you keep in memory all the resulting data.

[quote]Is it normal? And then, if it is, is there any way to improve the speed of this procedure?[/quote]If memory is the issue you would need to update the way you use the data to reduce the memory footprint (and example of what you do with the result of GetV1 would help us make recommendation).

Cheers,
Philippe.