# TTreePerfStats and performance improvements using TChains

Hi all,

I recently came across the following:
root.cern.ch/drupal/content/spin … -disk-spin
which I found very interesting, since possibilities to speed up root are always very welcome.

I’d be really interested in using the TTreePerfStats also with a TChain, since this is (at least personally) more often the use case as single trees.
When my chain consists of only 1 file, the CacheSize seems to have the same effect as in the example (I get a very similar plot from the TTreePerfStats).

However as soon as the chain consists of a few files, the CacheSize doesn’t seem to have an effect anymore (see attachement, one has to Zoom in on the x-axis to get a proper picture).
How would I effectively set the CacheSize for the complete TChain?

Sebastian
perfstats.root (22.9 KB)
TTreePerfStatsTest.c (1.8 KB)

The TTreePerfStats class is only implemented for the case of one file and not the case of a chain of files.
The results reported for one file should not be very different from the results on a TChain anyhow.

Rene