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 @@ ...@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import 'dart:developer';
import 'dart:ui' as ui show window; import 'dart:ui' as ui show window;
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
...@@ -227,7 +228,12 @@ abstract class RendererBinding extends BindingBase implements SchedulerBinding, ...@@ -227,7 +228,12 @@ abstract class RendererBinding extends BindingBase implements SchedulerBinding,
@override @override
void reassembleApplication() { void reassembleApplication() {
super.reassembleApplication(); super.reassembleApplication();
renderView.reassemble(); Timeline.startSync('Dirty Render Tree');
try {
renderView.reassemble();
} finally {
Timeline.finishSync();
}
handleBeginFrame(null); handleBeginFrame(null);
} }
......
...@@ -1873,9 +1873,14 @@ class BuildOwner { ...@@ -1873,9 +1873,14 @@ class BuildOwner {
/// ///
/// This is expensive and should not be called except during development. /// This is expensive and should not be called except during development.
void reassemble(Element root) { void reassemble(Element root) {
assert(root._parent == null); Timeline.startSync('Dirty Element Tree');
assert(root.owner == this); try {
root._reassemble(); 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