Skip to content

Performance penalty throughout API from LatLng usages #152

@bubenheimer

Description

@bubenheimer

android-maps-compose 2.2.1
compose 1.2.0-rc01

The android-maps-compose API imposes a performance penalty throughout by leveraging the Maps SDK LatLng type, which the compiler is currently unable to infer as stable. (Observed via compose compiler metrics: https://github.com/androidx/androidx/blob/androidx-main/compose/compiler/design/compiler-metrics.md)

I see 2 potential solutions:

  1. Replace LatLng with an equivalent stable type throughout maps-compose API.
  2. Work with compose compiler team to treat LatLng as stable.

I'd consider the second solution preferable.

Code example

@Composable
fun MyComposable(latLng: LatLng) {}

In this example the Compose compiler deems latLng unstable, rendering the composable function non-skippable.

Metadata

Metadata

Assignees

Labels

externalThis issue is blocked on a bug with the actual product.priority: p3Desirable enhancement or fix. May not be included in next release.releasedtype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions