Closed marcschw closed 3 years ago
I think this is similar issue with #4767.
Hi @marcschw I see there's an open issue addressing the case you described https://github.com/FirebaseExtended/flutterfire/issues/4767. Please follow up on that issue, I'm closing the current one as a duplicate. If you disagree, please write in the comments and I will reopen it. Thank you
Bug report
Describe the bug By upgrading from firebase_ml_vision ^0.9.10 to ^0.10.0 file size of my app-release.aab increased from 9.8 MB to 42.5 MB. I am just using on device text recognition features but it seems the new package version is suddenly including all kinds of tensorflow models and face recognition packages that were not needed before.
Steps to reproduce
Steps to reproduce the behavior:
Expected behavior
File size might increase slightly with a new version, but 4 times the size is just too much.
Additional context
Find the two app size analysis files included, you can compare them using flutter pub global run devtools
aab-code-size-analysis_before.txt aab-code-size-analysis_after.txt (rename to .json)
aab-code-size-analysis_before.json is the file size analysis with v. 0.9.10 aab-code-size-analysis_after.json is the file size analysis with v. 0.10.0
Flutter doctor
Run
flutter doctor
and paste the output below:Click To Expand
``` To analyze your app size in Dart DevTools, run the following command: flutter pub global activate devtools; flutter pub global run devtools --appSizeBase=aab-code-size-analysis_09.json β Built build/app/outputs/bundle/release/app-release.aab (11.2MB). (base) marcelschwarz@Marcels-MacBook-Pro cyberpunksolver % flutter doctor Doctor summary (to see all details, run flutter doctor -v): [β] Flutter (Channel dev, 1.26.0-12.0.pre, on Mac OS X 10.15.7 19H114 darwin-x64, locale en-AT) [β] Android toolchain - develop for Android devices (Android SDK version 30.0.3) [β] Xcode - develop for iOS and macOS [β] Chrome - develop for the web [β] Android Studio (version 4.1) [β] Connected device (1 available) β’ No issues found! ```Flutter dependencies
Run
flutter pub deps -- --style=compact
and paste the output below:Click To Expand
``` dependencies: - auto_size_text 2.1.0 [flutter] - clipboard 0.1.2+8 [flutter] - cupertino_icons 1.0.0 - firebase_analytics 6.3.0 [meta flutter firebase_core firebase_analytics_web firebase_analytics_platform_interface] - firebase_core 0.5.3 [firebase_core_platform_interface flutter quiver meta firebase_core_web] - firebase_ml_vision 0.9.10 [flutter] - flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine] - flutter_localizations 0.0.0 [flutter intl characters clock collection meta path typed_data vector_math] - flutter_sheet_localization 2.0.1 - font_awesome_flutter 8.11.0 [flutter] - hive 1.4.4+1 [meta crypto] - hive_flutter 0.3.1 [flutter hive path_provider path] - image_picker 0.6.7+21 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface] - in_app_purchase 0.3.5+1 [async collection flutter json_annotation meta] - in_app_review 1.0.4 [flutter in_app_review_platform_interface] - package_info 0.4.3+2 [flutter] - settings_ui 0.5.0 [flutter] - webview_flutter 1.0.7 [flutter] dev dependencies: - build_runner 1.11.0 [args async build build_config build_daemon build_resolvers build_runner_core code_builder collection crypto dart_style glob graphs http_multi_server io js logging meta mime path pedantic pool pub_semver pubspec_parse shelf shelf_web_socket stack_trace stream_transform timing watcher web_socket_channel yaml] - flutter_driver_helper 1.1.1 [flutter flutter_driver meta test] - flutter_launcher_icons 0.8.1 [image args yaml path] - flutter_native_splash 0.2.9 [yaml image xml] - flutter_sheet_localization_generator 2.1.2 [http meta csv recase code_builder dart_style source_gen flutter_sheet_localization build analyzer collection intl] - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data] - screenshots 2.1.1 [args yaml resource path file archive platform process meta intl tool_mobile] dependency overrides: - analyzer 0.40.1 [_fe_analyzer_shared args charcode cli_util collection convert crypto glob meta package_config path pub_semver source_span watcher yaml] - fake_process_manager 0.2.0 [process tool_base mockito test] - intl 0.17.0-nullsafety.2 [clock path] - screenshots 2.1.1 [args yaml resource path file archive platform process meta intl tool_mobile] - tool_base 2.0.0 [archive file intl platform process pub_cache] - tool_base_test 0.0.0 [tool_base reporting] - tool_mobile 2.0.0 [tool_base] transitive dependencies: - _fe_analyzer_shared 9.0.0 [meta] - archive 2.0.13 [crypto args path] - args 1.6.0 - async 2.5.0-nullsafety.3 [collection] - boolean_selector 2.1.0-nullsafety.3 [source_span string_scanner] - build 1.6.0 [analyzer async convert crypto logging meta path glob] - build_config 0.4.5 [checked_yaml json_annotation meta path pubspec_parse yaml] - build_daemon 2.1.4 [built_collection built_value http_multi_server logging pedantic path pool shelf shelf_web_socket stream_transform watcher web_socket_channel] - build_resolvers 1.5.1 [analyzer build crypto graphs logging meta path package_config pool pub_semver] - build_runner_core 6.1.5 [async build build_config build_resolvers collection convert crypto glob graphs json_annotation logging meta path package_config pedantic pool timing watcher yaml] - built_collection 4.3.2 [collection quiver] - built_value 7.1.0 [built_collection collection fixnum quiver] - characters 1.1.0-nullsafety.5 - charcode 1.2.0-nullsafety.3 - checked_yaml 1.0.4 [json_annotation source_span yaml] - cli_util 0.2.0 [path] - clock 1.1.0-nullsafety.3 - code_builder 3.5.0 [built_collection built_value collection matcher meta] - collection 1.15.0-nullsafety.5 - convert 2.1.1 [charcode typed_data] - coverage 0.14.2 [args logging package_config path source_maps stack_trace vm_service] - crypto 2.1.5 [collection convert typed_data] - csv 4.1.0 - dart_style 1.3.10 [analyzer args path source_span] - fake_async 1.2.0-nullsafety.3 [clock collection] - ffi 0.1.3 - file 6.0.0-nullsafety.4 [meta path] - firebase 7.3.3 [http http_parser js] - firebase_analytics_platform_interface 1.0.3 [flutter meta] - firebase_analytics_web 0.1.1 [flutter flutter_web_plugins firebase firebase_analytics_platform_interface meta] - firebase_core_platform_interface 2.1.0 [flutter meta plugin_platform_interface quiver] - firebase_core_web 0.2.1+1 [firebase_core_platform_interface flutter flutter_web_plugins meta js] - fixnum 0.10.11 - flutter_driver 0.0.0 [file meta path vm_service webdriver flutter flutter_test fuchsia_remote_debug_protocol archive args async boolean_selector characters charcode clock collection convert crypto fake_async json_rpc_2 matcher platform process source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api typed_data vector_math web_socket_channel] - flutter_plugin_android_lifecycle 1.0.11 [flutter] - flutter_web_plugins 0.0.0 [flutter js characters collection meta typed_data vector_math] - fuchsia_remote_debug_protocol 0.0.0 [json_rpc_2 process web_socket_channel flutter_test flutter_driver archive args async boolean_selector charcode clock collection convert crypto fake_async file matcher meta path platform source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api typed_data vector_math vm_service webdriver] - glob 1.2.0 [async collection node_io path pedantic string_scanner] - graphs 0.2.0 - http 0.12.2 [http_parser path pedantic] - http_multi_server 2.2.0 [async] - http_parser 3.1.4 [charcode collection source_span string_scanner typed_data] - image 2.1.19 [archive xml meta] - image_picker_platform_interface 1.1.1 [flutter meta http plugin_platform_interface] - in_app_review_platform_interface 1.0.5 [flutter url_launcher plugin_platform_interface platform] - io 0.3.4 [charcode meta path string_scanner] - js 0.6.3-nullsafety.3 - json_annotation 3.1.1 - json_rpc_2 2.2.2 [stack_trace stream_channel] - logging 0.11.4 - matcher 0.12.10-nullsafety.3 [stack_trace] - meta 1.3.0-nullsafety.6 - mime 0.9.7 - mockito 4.1.3 [analyzer build code_builder collection dart_style matcher meta source_gen test_api] - node_interop 1.2.1 [js] - node_io 1.1.1 [node_interop path] - node_preamble 1.4.12 - package_config 1.9.3 [path charcode] - path 1.8.0-nullsafety.3 - path_provider 1.6.24 [flutter path_provider_platform_interface path_provider_macos path_provider_linux path_provider_windows] - path_provider_linux 0.0.1+2 [path xdg_directories path_provider_platform_interface flutter] - path_provider_macos 0.0.4+6 [flutter] - path_provider_platform_interface 1.0.4 [flutter meta platform plugin_platform_interface] - path_provider_windows 0.0.4+3 [path_provider_platform_interface meta path flutter ffi win32] - pedantic 1.10.0-nullsafety.2 - petitparser 3.1.0 [meta] - platform 3.0.0-nullsafety.4 - plugin_platform_interface 1.0.3 [meta] - pool 1.5.0-nullsafety.2 [async stack_trace] - process 4.0.0-nullsafety.4 [file path platform] - pub_cache 0.2.3 [path pub_semver yaml] - pub_semver 1.4.4 [collection] - pubspec_parse 0.1.7 [checked_yaml json_annotation pub_semver yaml] - quiver 2.1.5 [matcher meta] - recase 3.0.1 - reporting 0.0.0 [usage tool_base] - resource 2.1.7 [typed_data] - shelf 0.7.9 [async collection http_parser path stack_trace stream_channel] - shelf_packages_handler 2.0.0 [path shelf shelf_static] - shelf_static 0.2.9+1 [convert http_parser mime path shelf] - shelf_web_socket 0.2.3 [shelf web_socket_channel stream_channel] - sky_engine 0.0.99 - source_gen 0.9.10+1 [analyzer async build dart_style glob meta path pedantic source_span] - source_map_stack_trace 2.1.0-nullsafety.3 [path stack_trace source_maps] - source_maps 0.10.10-nullsafety.2 [source_span] - source_span 1.8.0-nullsafety.4 [charcode collection path term_glyph] - stack_trace 1.10.0-nullsafety.6 [path] - stream_channel 2.1.0-nullsafety.3 [async] - stream_transform 1.2.0 - string_scanner 1.1.0-nullsafety.3 [charcode source_span] - sync_http 0.2.0 - term_glyph 1.2.0-nullsafety.3 - test 1.16.0-nullsafety.17 [analyzer async boolean_selector coverage http_multi_server io js node_preamble package_config path pedantic pool shelf shelf_packages_handler shelf_static shelf_web_socket source_span stack_trace stream_channel typed_data web_socket_channel webkit_inspection_protocol yaml test_api test_core] - test_api 0.2.19-nullsafety.6 [async boolean_selector collection meta path source_span stack_trace stream_channel string_scanner term_glyph matcher] - test_core 0.3.12-nullsafety.15 [analyzer async args boolean_selector collection coverage glob io meta package_config path pedantic pool source_map_stack_trace source_maps source_span stack_trace stream_channel vm_service yaml matcher test_api] - timing 0.1.1+3 [json_annotation] - typed_data 1.3.0-nullsafety.5 [collection] - url_launcher 5.7.10 [flutter url_launcher_platform_interface url_launcher_web url_launcher_linux url_launcher_macos url_launcher_windows] - url_launcher_linux 0.0.1+4 [flutter] - url_launcher_macos 0.0.1+9 [flutter] - url_launcher_platform_interface 1.0.9 [flutter meta plugin_platform_interface] - url_launcher_web 0.1.5+1 [url_launcher_platform_interface flutter flutter_web_plugins meta] - url_launcher_windows 0.0.1+3 [flutter] - usage 3.4.1 [path] - vector_math 2.1.0-nullsafety.5 - vm_service 5.5.0 [meta] - watcher 0.9.7+15 [async path pedantic] - web_socket_channel 1.1.0 [async crypto stream_channel] - webdriver 2.1.2 [archive matcher path stack_trace sync_http] - webkit_inspection_protocol 0.7.4 [logging] - win32 1.7.4 [ffi] - xdg_directories 0.1.2 [meta path process] - xml 4.5.1 [collection convert meta petitparser] - yaml 2.2.1 [charcode collection string_scanner source_span] ```