[flutter_runner] Port over the tuning advice (flutter/engine#12345)

This commit is contained in:
Kaushik Iska
2019-09-18 17:32:08 -07:00
committed by GitHub
parent 9e522b13b1
commit 4063939bd8

View File

@@ -22,9 +22,17 @@ namespace flutter_runner {
namespace {
// TODO: Properly tune these values. See FL-153.
constexpr int kGrCacheMaxCount = 8192;
constexpr size_t kGrCacheMaxByteSize = 8 * (1 << 20);
// Tuning advice:
// If you see the following 3 things happening simultaneously in a trace:
// * Over budget ("flutter", "GPURasterizer::Draw") durations
// * Many ("skia", "GrGpu::createTexture") events within the
// "GPURasterizer::Draw"s
// * The Skia GPU resource cache is full, as indicated by the
// "SkiaCacheBytes" field in the ("flutter", "SurfacePool") trace counter
// (compare it to the bytes value here)
// then you should consider increasing the size of the GPU resource cache.
constexpr size_t kGrCacheMaxByteSize = 16 * (1 << 20);
} // namespace