Skip to content

Instantly share code, notes, and snippets.

@eseidelGoogle
Created December 7, 2015 23:02
Show Gist options
  • Save eseidelGoogle/e052715acc22de150649 to your computer and use it in GitHub Desktop.
Save eseidelGoogle/e052715acc22de150649 to your computer and use it in GitHub Desktop.
Tracing on startup on flutter/engine@6d0c4e5 with and w/o --optimization_counter_threshold=-1
On 6d0c4e5.
diff --git a/sky/engine/core/script/dart_init.cc b/sky/engine/core/script/dart_init.cc
index e7a9d45..9d71485 100644
--- a/sky/engine/core/script/dart_init.cc
+++ b/sky/engine/core/script/dart_init.cc
@@ -64,6 +64,7 @@ void CreateEmptyRootLibraryIfNeeded() {
static const char* kDartArgs[] = {
"--enable_mirrors=false",
+ "--optimization_counter_threshold=-1",
// Dart assumes ARM devices are insufficiently powerful and sets the
// default profile period to 100Hz. This number is suitable for older
// Raspberry Pi devices but quite low for current smartphones.
5 runs using examples/stocks:
Installing SkyShell.apk on device.
Trace file saved to /tmp/trace_1.json
1 1528.636
Trace file saved to /tmp/trace_2.json
2 1455.591
Trace file saved to /tmp/trace_3.json
3 1502.779
Trace file saved to /tmp/trace_4.json
4 1464.564
Trace file saved to /tmp/trace_5.json
5 1495.28
mean: 1489.37
median: 1495.28
Without:
./dev/profile_startup.dart examples/stocks [/src/flutter]
Profiling startup using flutter start --trace-startup.
Measuring from first trace event to completion of first frame upload.
aka NativeViewGLSurfaceEGL:RealSwapBuffers.
NOTE: If device is not on/unlocked tracing may fail.
5 runs using examples/stocks:
Installing SkyShell.apk on device.
Trace file saved to /tmp/trace_1.json
1 1358.532
Trace file saved to /tmp/trace_2.json
2 1498.642
Trace file saved to /tmp/trace_3.json
3 1505.564
Trace file saved to /tmp/trace_4.json
4 1516.476
Trace file saved to /tmp/trace_5.json
5 1552.79
mean: 1486.4008
median: 1505.564
eseidel@eseidel2 /src/flutter %
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment