# HG changeset patch # User Chris Cannam # Date 1478771908 0 # Node ID f2f43802718b0016d5579e9e3b0c6ab8f3e9d785 # Parent ab169938832aa3ce9d738ba56981f8c11a8ff673 More timings and cache hit counts diff -r ab169938832a -r f2f43802718b layer/Colour3DPlotRenderer.cpp --- a/layer/Colour3DPlotRenderer.cpp Tue Nov 08 14:55:53 2016 +0000 +++ b/layer/Colour3DPlotRenderer.cpp Thu Nov 10 09:58:28 2016 +0000 @@ -289,6 +289,8 @@ Colour3DPlotRenderer::getColumn(int sx, int minbin, int nbins, bool usePeakCache) const { + Profiler profiler("Colour3DPlotRenderer::getColumn"); + // order: // get column -> scale -> normalise -> record extents -> // peak pick -> distribute/interpolate -> apply display gain @@ -737,6 +739,8 @@ RenderTimer::FastRender : RenderTimer::NoTimeout); + Profiler profiler("Colour3DPlotRenderer::renderDrawBuffer"); + int divisor = 1; const DenseThreeDimensionalModel *sourceModel = m_sources.source; if (usePeakCache) { @@ -977,7 +981,7 @@ } if (!pixelPeakColumn.empty()) { - + for (FFTModel::PeakSet::const_iterator pi = peakfreqs.begin(); pi != peakfreqs.end(); ++pi) { diff -r ab169938832a -r f2f43802718b layer/ScrollableImageCache.cpp --- a/layer/ScrollableImageCache.cpp Tue Nov 08 14:55:53 2016 +0000 +++ b/layer/ScrollableImageCache.cpp Thu Nov 10 09:58:28 2016 +0000 @@ -14,6 +14,8 @@ #include "ScrollableImageCache.h" +#include "base/HitCount.h" + #include using namespace std; @@ -23,6 +25,8 @@ ScrollableImageCache::scrollTo(const LayerGeometryProvider *v, sv_frame_t newStartFrame) { + static HitCount count("ScrollableImageCache: scrolling"); + int dx = (v->getXForFrame(m_startFrame) - v->getXForFrame(newStartFrame)); @@ -33,12 +37,14 @@ if (m_startFrame == newStartFrame) { // haven't moved + count.hit(); return; } m_startFrame = newStartFrame; if (!isValid()) { + count.miss(); return; } @@ -46,14 +52,18 @@ if (dx == 0) { // haven't moved visibly (even though start frame may have changed) + count.hit(); return; } if (dx <= -w || dx >= w) { // scrolled entirely off invalidate(); + count.miss(); return; } + + count.partial(); // dx is in range, cache is scrollable diff -r ab169938832a -r f2f43802718b layer/ScrollableMagRangeCache.cpp --- a/layer/ScrollableMagRangeCache.cpp Tue Nov 08 14:55:53 2016 +0000 +++ b/layer/ScrollableMagRangeCache.cpp Thu Nov 10 09:58:28 2016 +0000 @@ -14,6 +14,8 @@ #include "ScrollableMagRangeCache.h" +#include "base/HitCount.h" + #include using namespace std; @@ -23,6 +25,8 @@ ScrollableMagRangeCache::scrollTo(const LayerGeometryProvider *v, sv_frame_t newStartFrame) { + static HitCount count("ScrollableMagRangeCache: scrolling"); + int dx = (v->getXForFrame(m_startFrame) - v->getXForFrame(newStartFrame)); @@ -33,6 +37,7 @@ if (m_startFrame == newStartFrame) { // haven't moved + count.hit(); return; } @@ -40,6 +45,7 @@ if (dx == 0) { // haven't moved visibly (even though start frame may have changed) + count.hit(); return; } @@ -48,8 +54,11 @@ if (dx <= -w || dx >= w) { // scrolled entirely off invalidate(); + count.miss(); return; } + + count.partial(); // dx is in range, cache is scrollable