@@ -140,7 +140,9 @@ abstract class BindingBase {
140
140
/// [initServiceExtensions] to have bindings initialize their
141
141
/// VM service extensions, if any.
142
142
BindingBase () {
143
- developer.Timeline .startSync ('Framework initialization' );
143
+ if (! kReleaseMode) {
144
+ developer.Timeline .startSync ('Framework initialization' );
145
+ }
144
146
assert (() {
145
147
_debugConstructed = true ;
146
148
return true ;
@@ -154,9 +156,10 @@ abstract class BindingBase {
154
156
initServiceExtensions ();
155
157
assert (_debugServiceExtensionsRegistered);
156
158
157
- developer.postEvent ('Flutter.FrameworkInitialization' , < String , String > {});
158
-
159
- developer.Timeline .finishSync ();
159
+ if (! kReleaseMode) {
160
+ developer.postEvent ('Flutter.FrameworkInitialization' , < String , String > {});
161
+ developer.Timeline .finishSync ();
162
+ }
160
163
}
161
164
162
165
bool _debugConstructed = false ;
@@ -550,14 +553,19 @@ abstract class BindingBase {
550
553
/// The [Future] returned by the `callback` argument is returned by [lockEvents] .
551
554
@protected
552
555
Future <void > lockEvents (Future <void > Function () callback) {
553
- final developer.TimelineTask timelineTask = developer.TimelineTask ()..start ('Lock events' );
556
+ developer.TimelineTask ? timelineTask;
557
+ if (! kReleaseMode) {
558
+ timelineTask = developer.TimelineTask ()..start ('Lock events' );
559
+ }
554
560
555
561
_lockCount += 1 ;
556
562
final Future <void > future = callback ();
557
563
future.whenComplete (() {
558
564
_lockCount -= 1 ;
559
565
if (! locked) {
560
- timelineTask.finish ();
566
+ if (! kReleaseMode) {
567
+ timelineTask! .finish ();
568
+ }
561
569
unlocked ();
562
570
}
563
571
});
0 commit comments