Skip to content

Export processed app size data report  #8110

Description

@hrajwade96

At present, reporting app analysis within our organization using DevTools involves a somewhat manual process of noting the files that contribute more to the app size, as there is no export option and text is not selectable.

I attempted to make the text selectable, but copied text requires some further processing, which is not the cleanest approach. Therefore, I propose adding the following feature:

Feature Proposal:

Export Processed and Sorted Data to CSV: Allow users to export the analyzed and sorted data to a CSV file for easier reporting and analysis.

Additional Context:

The current manual process can be time-consuming and error-prone.
An export feature would streamline the reporting process and make data analysis more efficient.
Thank you for considering this feature request. I look forward to your feedback.

I have written some code for this feature, and it seems to be working well. If this feature is deemed beneficial for the broader community, I am willing to raise a PR for it.

Activity

  1. hrajwade96 commented on Jul 30, 2024

    @hrajwade96
    ContributorAuthor

    @kenzieschmoll what are your thoughts on this?

  2. kenzieschmoll commented on Jul 31, 2024

    @kenzieschmoll
    Member

    @hrajwade96 can you provide an example of what the data would look like when exported to CSV? My main concern with this would be that the export format would be inconsistent with the JSON format used for other DevTools screens, and could be difficult to make work within the existing DevTools offline framework (#4470). I think this is a bit different than the export to HAR functionality from the network page since a HAR file is a format accepted by other popular network traffic viewers, whereas a CSV format here could be a very raw data viewing experience.

    What would it take to make the app size tool in DevTools fit the use case you need? If you were able to export a diff from the app size tool that you could later import to DevTools, would this meet your use case?

  3. hrajwade96 commented on Aug 1, 2024

    @hrajwade96
    ContributorAuthor

    @kenzieschmoll Let me first answer your question about my use case -
    I use Devtools app size visualisation and table for doing analysis for my builds release wise, hence it involves both diff as well as single build analysis, Now I do make some manual notes but I need to share the actual values and text let's say with management or product teams who don't have flutter setup hence they can't open this in devtools if i share a json.
    (json and offline support I find more useful for sharing accross dev teams and for maintaining data).
    At present I do this by manually noting down or using AI tools to convert it into text because I face following challenges-

    1. Can't take SS because the sizes on the right side are not visible, on zooming out SS will be blur, and SS will be limited if i have multiple items I will have to take multiple SS.
    2. Text is not selectable hence can't copy paste it. (even when i turn this on it needs a little bit of text processing to make it presentable).

    What I actually want is to share the results of the visualisation and table provided by Devtools for both diff and single file.
    to give you an example -
    source-map-explorer tool (installable from NPM) - for web
    Using this tool we can generate a visualisation which can be saved as a offline html file and can be opened in any browser directly.
    (It also supports json and tsv). I need some way of doing the similar thing for devtools report for Android and iOS (not necessarily in the same way).

    Now regarding CSV - I was thinking to keep the tree node depth modifiable to the dev, so that he will not export unnecessary data, that should solve raw data problem to some extent. Second challenge is preserving the hierarchy in CSV, (for now appended paths from parent)

    My generated CSV I can't share at the moment as it is a private enterprise project, but I will generate for a sample project and share it here soon.
    Another thought - can we include the analysis (processed data) in the analysis json?

    Need to think more about how to solve these challenges, do you have better ideas than using CSV?

  4. hrajwade96 commented on Aug 15, 2024

    @hrajwade96
    ContributorAuthor

    Hi @kenzieschmoll just wanted to follow up on my previous comment, I'm keen to hear your thoughts on this.

  5. hrajwade96 commented on Nov 19, 2024

    @hrajwade96
    ContributorAuthor

    @kenzieschmoll
    I tried filtering the data and exporting it to a json while preserving the hierarchy.
    I filtered the data based on :

    1. Node bytesize - I want to see only major contributors to increase in size. Here I have taken it as >=100kb.
    2. Max depth (optional)- in this case I have taken it as 5.

    data for a sample app -

    Original app size json file :
    apk-code-size-analysis_01.json

    Filtered Data :
    CSV dart_devtools_2024-11-19_12_57_10.011.csv
    JSON dart_devtools_2024-11-19_12_57_10.016.json

    I created a web app to visualise this data:

    image

    Can we create this as an extension to dev tools? or add this type of filtering feature?

  6. hrajwade96 commented on Feb 21, 2025

    @hrajwade96
    ContributorAuthor

    @kenzieschmoll I tried filtering the data and exporting it to a json while preserving the hierarchy. I filtered the data based on :

    1. Node bytesize - I want to see only major contributors to increase in size. Here I have taken it as >=100kb.
    2. Max depth (optional)- in this case I have taken it as 5.

    data for a sample app -

    Original app size json file : apk-code-size-analysis_01.json

    Filtered Data : CSV dart_devtools_2024-11-19_12_57_10.011.csv JSON dart_devtools_2024-11-19_12_57_10.016.json

    I created a web app to visualise this data:

    image Can we create this as an extension to dev tools? or add this type of filtering feature?

    @bkonyi @kenzieschmoll any thoughts or comments on this

  7. kenzieschmoll commented on Feb 25, 2025

    @kenzieschmoll
    Member

    add this type of filtering feature

    I think this would be a good first step rather than trying to create a DevTools extension or add export functionality (of a different format than the core DevTools offline framework) to the App Size tool.

  8. hrajwade96 commented on Mar 16, 2025

    @hrajwade96
    ContributorAuthor

    Appreciate the suggestion! I'll explore and outline this approach and then maybe raise a draft PR to showcase this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions