New Dart DevTools Release - 0.9.1

183 views
Skip to first unread message

Kenzie Schmoll

unread,
Sep 3, 2020, 2:27:23 PM9/3/20
to Flutter Public Announcements (flutter-announce)

DevTools 0.9.1 Release Notes

Dart DevTools - A Suite of Performance Tools for Dart and Flutter

General Updates

  • Add option for users to opt-in to feature usage reporting. Feature usage statistics and crash reports help us improve the tool over time. Users can opt-in by clicking “Sounds good!” on the dialog:


New! Code Size Debugging Tool

  • Added a new tool to DevTools to assist in code / app size debugging. The tool provides ways to visualize and analyze code / app size data.



To use the tool, you can navigate to the tab if you are already connected to an app, OR, if you are not connected to an app, you can access the tool from the landing page that appears once you have launched DevTools (flutter pub global activate devtools; flutter pub global run devtools):



When you open the tool, you’ll see two tabs: 

  • “Analysis” - allows you to analyze a single size file (view image above)

  • “Diff” - allows you to compare two size files


What is a “size file”?

Flutter Code Size Analysis Files*

*Requires Flutter version 1.22.0-9.0.pre or greater (on the dev branch at the time of this release)


To analyze the size of your entire app, including analysis for Native and Dart code, generate a code size analysis file using the --analyze-size flag via flutter build <your target platform> --analyze-size. This will build your application, print a size summary to the command line, and print a line telling you where to find the size analysis file. You must create a new build with the --analyze-size flag - you cannot use this tool with an existing build.


e.g. 

 flutter build apk --analyze-size --target-platform=android-arm64 



In this example, the file found at build/apk-code-size-analysis_01.json is the file we will drag-and-drop into DevTools to analyze the data further.

Dart AOT Snapshot Files

If you are not interested in total app size, but rather are only interested in Dart code size, the tool also supports importing Dart AOT v8 snapshots. You can generate this file via


flutter build aot --release --extra-gen-snapshot-options=--write-v8-snapshot-profile-to=profile.json

The file generated by this command is a graph representation of the snapshot. It attributes bytes written into a snapshot to a node in the heap graph. This format covers both data and code sections of the snapshot. 


Note: the data in the v8 snapshot file is a subset of the data in the Flutter code size analysis files detailed above, so we recommend that you use the Flutter code size analysis files for all Flutter code size debugging. 

Network Profiler Updates

  • Use MIME types for http requests #2262

Changelog

More details about changes and fixes are available in our changelog.


Reply all
Reply to author
Forward
0 new messages