diff --git a/packages/flutter/lib/src/foundation/_isolates_io.dart b/packages/flutter/lib/src/foundation/_isolates_io.dart index 6c652645cf..f114bb1904 100644 --- a/packages/flutter/lib/src/foundation/_isolates_io.dart +++ b/packages/flutter/lib/src/foundation/_isolates_io.dart @@ -12,9 +12,7 @@ import 'isolates.dart' as isolates; /// The dart:io implementation of [isolate.compute]. Future compute(isolates.ComputeCallback callback, Q message, { String debugLabel }) async { - if (!kReleaseMode) { - debugLabel ??= callback.toString(); - } + debugLabel ??= kReleaseMode ? 'compute' : callback.toString(); final Flow flow = Flow.begin(); Timeline.startSync('$debugLabel: start', flow: flow); final ReceivePort resultPort = ReceivePort(); @@ -80,7 +78,7 @@ class _IsolateConfiguration { Future _spawn(_IsolateConfiguration> configuration) async { R result; await Timeline.timeSync( - '${configuration.debugLabel}', + configuration.debugLabel, () async { final FutureOr applicationResult = await configuration.apply(); result = await applicationResult;