Skip to content

☂️ Deferred Components: Build and load split AOT Android App Bundles #57617

@mehmetf

Description

@mehmetf

Internal: b/160378043

As detailed in dart-lang/sdk#41974, customer:money is interested in splitting their AOT code by country and by feature. Once Dart VM team provides this capability, we need changes to engine (and tooling) to be able to generate these splits and load them.

Phase 1: Install-time AOT Code Splits
This would be transparent to the app. We would load all the splits into memory when a Dart isolate gets created. This requires an engine change but no application specific API.

Phase 2: Dynamic AOT Code splits.
This would require an engine change as well which would expose a system channel to request a particular AOT split to be loaded into the isolate. It is possible that we want these asset loading that is exposed via flutter engine (FlutterLoader) to do this. FlutterLoader would access Core APIs to download the so's and then load into isolate. There's an argument to be made to extend this to any PlatformAsset; I would leave that decision to the engine team.

PS: The tooling change is lower priority from customer's point of view since we have to implement this in g3.

The following is added/tracked by @GaryQian at the top for visibility:

Tasks left TODO:

Engine:

Framework:

Tooling:

Misc:

  • Finish instructions/guide (go/flutter-split-aot-instructions)
  • Finalize naming, eg, what to call this feature ("Deferred Components")

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listc: new featureNothing broken; request for a new capabilityc: performanceRelates to speed or footprint issues (see "perf:" labels)customer: money (g3)engineflutter/engine related. See also e: labels.p: toolingAffects the flutter_plugin_tools packageperf: app sizePerformance issues related to app size (binary/code size) or disk spaceplatform-androidAndroid applications specifically

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions