Commit 648f7063 authored by Ian Hickson's avatar Ian Hickson Committed by GitHub

Add more timeline ranges for profiling hot reload (#7792)

parent 829976d3
......@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:developer';
import 'dart:ui' as ui show window;
import 'package:flutter/foundation.dart';
......@@ -227,7 +228,12 @@ abstract class RendererBinding extends BindingBase implements SchedulerBinding,
@override
void reassembleApplication() {
super.reassembleApplication();
renderView.reassemble();
Timeline.startSync('Dirty Render Tree');
try {
renderView.reassemble();
} finally {
Timeline.finishSync();
}
handleBeginFrame(null);
}
......
......@@ -1873,9 +1873,14 @@ class BuildOwner {
///
/// This is expensive and should not be called except during development.
void reassemble(Element root) {
assert(root._parent == null);
assert(root.owner == this);
root._reassemble();
Timeline.startSync('Dirty Element Tree');
try {
assert(root._parent == null);
assert(root.owner == this);
root._reassemble();
} finally {
Timeline.finishSync();
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment