# Large loop on txt files

**URL:** <https://root-forum.cern.ch/t/large-loop-on-txt-files/39684>\
**Category:** Newbie\
**Created:** [May 30, 2020, 8:35pm UTC](https://root-forum.cern.ch/t/large-loop-on-txt-files/39684 "2020-05-30T20:35:59Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [June 1, 2020, 5:35pm UTC](https://root-forum.cern.ch/t/large-loop-on-txt-files/39684/4 "2020-06-01T17:35:07Z")

</div>

Hi @florian_Gautier,  
the time difference is definitely not due to a difference in compile/interpret times. It might have to do with [Slow down reading many TFiles](https://root-forum.cern.ch/t/slow-down-reading-many-tfiles/39512) (@pcanal might be able to comment).

You can check where the program spends time e.g. with [perf record and perf report](https://perf.wiki.kernel.org/index.php/Tutorial#Sampling_with_perf_record), or with the [poor man’s profiler](https://poormansprofiler.org/), which works very well when there is a single callstack that occupies most of the time, as it is probably the case here.

Cheers,  
Enrico

---

_[View the full topic](https://root-forum.cern.ch/t/large-loop-on-txt-files/39684)._
