text
stringlengths 1
474
|
|---|
app. Frames that perform shader compilation are marked in dark
|
red:For more information on how to reduce shader compilation jank,
|
check out Reduce shader compilation jank on mobile.<topic_end>
|
<topic_start>
|
Frame analysis tab
|
Selecting a janky frame (slow, colored in red)
|
from the Flutter frames chart above shows debugging hints
|
in the Frame analysis tab. These hints help you diagnose
|
jank in your app, and notify you of any expensive operations
|
that we have detected that might have contributed to the slow frame time.<topic_end>
|
<topic_start>
|
Raster stats tab
|
info Note
|
For best results, this tool should be used with
|
the Impeller rendering engine. When using Skia,
|
the raster stats reported might be inconsistent
|
due to the timing of when shaders are compiled.If you have Flutter frames that are janking with
|
slow raster thread times, this tool might be able
|
to help you diagnose the source of the slow performance.
|
To generate raster stats:If you see an expensive layer, find the Dart code in your app
|
that is producing this layer and investigate further.
|
You can make changes to your code, hot reload,
|
and take new snapshots to see if the performance of a layer
|
was improved by your change.<topic_end>
|
<topic_start>
|
Timeline events tab
|
The timeline events chart shows all event tracing from your application.
|
The Flutter framework emits timeline events as it works to build frames,
|
draw scenes, and track other activity such as HTTP request timings
|
and garbage collection. These events show up here in the Timeline.
|
You can also send your own Timeline events using the dart:developer
|
Timeline and TimelineTask APIs.
|
For help with navigating and using the trace viewer,
|
click the ? button at the top right of the timeline
|
events tab bar. To refresh the timeline with new events from
|
your application, click the refresh button
|
(also in the upper right corner of the tab controls).<topic_end>
|
<topic_start>
|
Advanced debugging tools
|
<topic_end>
|
<topic_start>
|
Enhance tracing
|
To view more detailed tracing in the timeline events chart,
|
use the options in the enhance tracing dropdown:info Note
|
Frame times might be negatively affected when these options are enabled.To see the new timeline events, reproduce the activity
|
in your app that you are interested in tracing,
|
and then select a frame to inspect the timeline.<topic_end>
|
<topic_start>
|
Track widget builds
|
To see the build() method events in the timeline,
|
enable the Track Widget Builds option.
|
The name of the widget is shown in the timeline event.Watch this video for an example of tracking widget builds<topic_end>
|
<topic_start>
|
Track layouts
|
To see render object layout events in the timeline,
|
enable the Track Layouts option:Watch this video for an example of tracking layouts<topic_end>
|
<topic_start>
|
Track paints
|
To see render object paint events in the timeline,
|
enable the Track Paints option:Watch this video for an example of tracking paints<topic_end>
|
<topic_start>
|
More debugging options
|
To diagnose performance problems related to rendering layers,
|
toggle off a rendering layer.
|
These options are enabled by default.To see the effects on your app’s performance,
|
reproduce the activity in your app.
|
Then select the new frames in the frames chart
|
to inspect the timeline events
|
with the layers disabled.
|
If Raster time has significantly decreased,
|
excessive use of the effects you disabled might be contributing
|
to the jank you saw in your app.<topic_end>
|
<topic_start>
|
Import and export
|
DevTools supports importing and exporting performance snapshots.
|
Clicking the export button (upper-right corner above the
|
frame rendering chart) downloads a snapshot of the current data on the
|
performance page. To import a performance snapshot, you can drag and drop the
|
snapshot into DevTools from any page. Note that DevTools only
|
supports importing files that were originally exported from DevTools.<topic_end>
|
<topic_start>
|
Other resources
|
To learn how to monitor an app’s performance and
|
detect jank using DevTools, check out a guided
|
Performance View tutorial.
|
<topic_end>
|
<topic_start>Using the CPU profiler view
|
info Note
|
The CPU profiler view works with Dart CLI and mobile apps only.
|
Use Chrome DevTools to analyze performance
|
of a web app.The CPU profiler view allows you to record and profile a
|
session from your Dart or Flutter application.
|
The profiler can help you solve performance problems
|
or generally understand your app’s CPU activity.
|
The Dart VM collects CPU samples
|
(a snapshot of the CPU call stack at a single point in time)
|
and sends the data to DevTools for visualization.
|
By aggregating many CPU samples together,
|
the profiler can help you understand where the CPU
|
spends most of its time.info Note
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.