-
Notifications
You must be signed in to change notification settings - Fork 2
Evaluation and Migration
sonmbol edited this page Jul 28, 2026
·
1 revision
Start with one non-critical screen and measure the bridge rather than adopting it across the application immediately.
- Select one ViewModel and one exported state stream.
- Keep the bridge in a thin live container.
- Pass Swift values, bindings, and actions to a pure presentation view.
- Verify construction, collection, cancellation, rebinding, and disposal.
- Count body evaluations for independent fields.
- Profile allocations and delivery throughput on target hardware.
If a Swift ObservableObject currently copies Kotlin state:
final class ProfileAdapter: ObservableObject {
@Published var state: ProfileState
let model: ProfileViewModel
}replace the adapter owner with KMPStateObject, keep the presentation view
unchanged, supply $profile.profileState, and forward actions directly to
Kotlin. Remove the copied Swift state only after lifecycle and rendering tests
pass.
- Kotlin ViewModel construction and disposal counts.
- Underlying collector counts with multiple wrappers.
- Body evaluations for unrelated field emissions.
- Cancellation after navigation and replacement.
- Weak-reference release across Swift ARC and Kotlin GC.
- Immediate and coalesced delivery results.
See the repository’s evaluation guide and benchmark methodology.