text stringlengths 1 372 |
|---|
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 |
if you are running a flutter application, |
use a profile build to analyze performance. |
CPU profiles are not indicative of release performance |
unless your flutter application is run in profile mode. |
<topic_end> |
<topic_start> |
CPU profiler |
start recording a CPU profile by clicking record. |
when you are done recording, click stop. at this point, |
CPU profiling data is pulled from the VM and displayed |
in the profiler views (call tree, bottom up, method table, |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.