forked from firka/flutter
Add more timeline ranges for profiling hot reload (#7792)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user