# HG changeset patch # User Chris Cannam # Date 1478771908 0 # Node ID 200c60de27ca594ef58d11bdd6e32311d257f643 # Parent 5236543343c3665e4f1283d92511ea0c7c61b0d3 More timings and cache hit counts diff -r 5236543343c3 -r 200c60de27ca data/fileio/WavFileReader.cpp --- a/data/fileio/WavFileReader.cpp Thu Nov 10 09:23:05 2016 +0000 +++ b/data/fileio/WavFileReader.cpp Thu Nov 10 09:58:28 2016 +0000 @@ -16,6 +16,7 @@ #include "WavFileReader.h" #include "base/HitCount.h" +#include "base/Profiler.h" #include @@ -138,6 +139,8 @@ QMutexLocker locker(&m_mutex); + Profiler profiler("WavFileReader::getInterleavedFrames"); + if (!m_file || !m_channelCount) { return {}; } diff -r 5236543343c3 -r 200c60de27ca data/model/FFTModel.cpp --- a/data/model/FFTModel.cpp Thu Nov 10 09:23:05 2016 +0000 +++ b/data/model/FFTModel.cpp Thu Nov 10 09:58:28 2016 +0000 @@ -291,12 +291,12 @@ vector> FFTModel::getFFTColumn(int n) const { - // The small cache (i.e. the m_cached deque) is for peak-frequency - // spectrograms, where values from two consecutive columns are + // The small cache (i.e. the m_cached deque) is for cases where + // values are looked up individually, and for e.g. peak-frequency + // spectrograms where values from two consecutive columns are // needed at once. This cache gets essentially no hits when - // scrolling through a magnitude spectrogram but 95%+ hits with a - // peak-frequency spectrogram. Since it costs very little, it's - // well worth having. + // scrolling through a magnitude spectrogram, but 95%+ hits with a + // peak-frequency spectrogram. for (const auto &incache : m_cached) { if (incache.n == n) { inSmallCache.hit(); @@ -304,6 +304,8 @@ } } inSmallCache.miss(); + + Profiler profiler("FFTModel::getFFTColumn (cache miss)"); auto samples = getSourceSamples(n); m_windower.cut(samples.data());