devtools icon indicating copy to clipboard operation
devtools copied to clipboard

Export snapshot.

Open polina-c opened this issue 1 year ago • 1 comments

Primary purpose of this PR is to implement export for snapshots.

For release notes: Screenshot 2024-03-07 at 11 01 08 AM

Side effects of this PR are:

  1. Refactored structure of snapshot diffing, because we want to store the snapshot in original format
  2. Improved performance of snapshotting (increased number of snapshots that can be taken 10 times and performance 2 times).

Also this PR suggests to un-ignore DEPENDENCIES.md for folders where they help to understand code.

Performance for DevTools in release mode, in chrome, connected to gallery on mac in debug mode, home page, on polina-c's mac, taking snapshots sequentially, one after another:

  • Original: 3 snapshots takes 30 sec, crash happens on 6th snapshot
  • New, before upgrade of vm_service: three snapshots 15 sec, OOM crash on 60th snapshot

TODO for this PR:

  • [ ] Uncomment tests and ensure test coverage
  • [ ] Implement 'assertIntegrity'
  • [ ] Save actual content of snapshot after merging https://github.com/flutter/devtools/pull/7331
  • [ ] Measure new performance

polina-c avatar Feb 08 '24 22:02 polina-c

https://github.com/flutter/devtools/assets/12115586/55b24bfe-27b9-4889-8138-b284ad16e8e1

polina-c avatar Mar 07 '24 19:03 polina-c