Speedup DEFLICKER_HISTOGRAM_SOURCE_SOURCEFILE by caching histogram