text
stringlengths
1
372
this chart contains flutter frame information for your application.
each bar set in the chart represents a single flutter frame.
the bars are color-coded to highlight the different portions
of work that occur when rendering a flutter frame: work from
the UI thread and work from the raster thread (previously known
as the GPU thread).
this chart contains flutter frame timing information for your
application. each pair of bars in the chart represents a single
flutter frame. selecting a frame from this chart updates the data
that is displayed below in the frame analysis tab
or the timeline events tab.
(as of DevTools 2.23.1, the raster stats
is a standalone feature without data per frame).
the flutter frames chart updates when new frames
are drawn in your app. to pause updates to this chart,
click the pause button to the right of the chart.
this chart can be collapsed to provide more viewing space
for data below by clicking the flutter frames button above the chart.
the pair of bars representing each flutter frame are color-coded
to highlight the different portions of work that occur when rendering
a flutter frame: work from the UI thread and work from the raster thread
(previously known as the GPU thread).
<topic_end>
<topic_start>
UI
the UI thread executes dart code in the dart VM. this includes
code from your application as well as the flutter framework.
when your app creates and displays a scene, the UI thread creates
a layer tree, a lightweight object containing device-agnostic
painting commands, and sends the layer tree to the raster thread
to be rendered on the device. do not block this thread.
<topic_end>
<topic_start>
raster
the raster thread (previously known as the GPU thread)
executes graphics code from the flutter engine.
this thread takes the layer tree and displays it by talking to
the GPU (graphic processing unit). you can’t directly access
the raster thread or its data, but if this thread is slow,
it’s a result of something you’ve done in the dart code.
skia, the graphics library, runs on this thread.
impeller (in the stable channel for iOS)
also uses this thread.
sometimes a scene results in a layer tree that is easy to construct,
but expensive to render on the raster thread. in this case, you
need to figure out what your code is doing that is causing
rendering code to be slow. specific kinds of workloads are more
difficult for the GPU. they might involve unnecessary calls to
saveLayer(), intersecting opacities with multiple objects,
and clips or shadows in specific situations.
for more information on profiling, check out
identifying problems in the GPU graph.
<topic_end>
<topic_start>
jank (slow frame)
the frame rendering chart shows jank with a red overlay.
a frame is considered to be janky if it takes more than
~16 ms to complete (for 60 FPS devices). to achieve a frame rendering rate of
60 FPS (frames per second), each frame must render in
~16 ms or less. when this target is missed, you may
experience UI jank or dropped frames.
for more information on how to analyze your app’s performance,
check out flutter performance profiling.
<topic_end>
<topic_start>
shader compilation
shader compilation occurs when a shader is first used in your flutter
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.