I tried building the current dev debug build of RT this morning with -pg added, simply to see what is going on - just for fun. I found something interesting though, which I cannot explain. FYI: I’m opening RT into a completely empty folder.
These are the first few lines of output I get when running gprof
afterwards:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ns/call ns/call name
56.25 0.09 0.09 _mcount_private
18.75 0.12 0.03 __fentry__
12.50 0.14 0.02 rtengine::(anonymous namespace)::catmull_rom_spline(int, double, double, double, double, double, double, double, double, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&)
6.25 0.15 0.01 697589 14.34 14.34 LUT<float>::operator[](int) const
6.25 0.16 0.01 exp
0.00 0.16 0.00 3009904 0.00 0.00 std::vector<rtexif::Tag*, std::allocator<rtexif::Tag*> >::size() const
0.00 0.16 0.00 2877878 0.00 0.00 rtexif::Tag::getID() const
0.00 0.16 0.00 2640799 0.00 0.00 std::vector<rtexif::Tag*, std::allocator<rtexif::Tag*> >::operator[](unsigned long long) const
0.00 0.16 0.00 835170 0.00 0.00 int const& rtengine::LIM<int>(int const&, int const&, int const&)
0.00 0.16 0.00 764653 0.00 0.00 int const& rtengine::min<int>(int const&, int const&)
0.00 0.16 0.00 715466 0.00 0.00 int const& rtengine::max<int>(int const&, int const&)
What’s going on with all those function calls when there are no images in the current folder? Calling a function related to exif 2877878 times? And even the number of calls to the LUT is oddly high.
Any clue?