Re: [ROOT] big files with lot of objects ?

From: Valeri Fine (fine@bnl.gov)
Date: Tue Nov 27 2001 - 23:57:25 MET


> Hi again,

Hi

> if I need many huge objects in my project is there a
> limit where its better to store them in multiple files
> or does the Key feature make things fast enough that
> there is no difference in how fast I get my objects
> from the file ?

TKey class provides a direct access to your object 
(assuming it is not a part of TTree). 
In this case it doesn't matter how large your file is.
Roughly say the time to get your object in is:

   1. Time to read the TList of all TKeys of the current   
       TFile at the time the file is open. Since TKey has a fixed size
       the time to read TKey's in depends on the number of the objects 
       your TFile contains.  So it is fast if the number of the TKey's 
        is reasonable.

   2. Time to look up the list of TKey (in memory). It is quick 
        if the number of key is reasonable. That's true if your 
        objects are huge  <?? how large is your huge ??> as you claimed

  3. Time to move a hard drive head to the first byte of your object (directly)
  4.  Time to read your object in. 

  I think in your case (huge objects -> small number of the objects) you may 
  neglect (you may suggest this time is a constant) the point 1-3 vs point 4.

   Hope this helps,  Valeri

     
> 
> 
> Joe
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
> http://geocities.yahoo.com/ps/info1
> 



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:10 MET