android-maps-compose 4.3.0
I see an avoidable performance hit in the code for the initial GoogleMap() subcomposition run: the code essentially configures all possible Map configuration options in an exhaustive manner, rather than only the ones that the API consumer cares about.
This includes CameraPositionState, LocationSource, all 9 properties in MapProperties, GoogleMap padding, and all 10 properties in MapUISettings. At least 22 GoogleMap class function calls upon initial composition, many of which may never actually need to be explicitly set.
Another part of the problem is that the MapView is already being rendered while all these options are set, exhaustively reconfiguring the map while it is being displayed.
All this would not be much of a problem if all the GoogleMap class function calls were guaranteed to execute swiftly. I suspect that this is not the case for all of them, e.g. due to synchronization/locking/blocking and inter-process calls.
Just to be clear: this is a potential architectural and performance problem I see in the code, not something I have actually experienced or tested.
android-maps-compose 4.3.0
I see an avoidable performance hit in the code for the initial
GoogleMap()subcomposition run: the code essentially configures all possible Map configuration options in an exhaustive manner, rather than only the ones that the API consumer cares about.This includes CameraPositionState, LocationSource, all 9 properties in MapProperties, GoogleMap padding, and all 10 properties in MapUISettings. At least 22 GoogleMap class function calls upon initial composition, many of which may never actually need to be explicitly set.
Another part of the problem is that the
MapViewis already being rendered while all these options are set, exhaustively reconfiguring the map while it is being displayed.All this would not be much of a problem if all the GoogleMap class function calls were guaranteed to execute swiftly. I suspect that this is not the case for all of them, e.g. due to synchronization/locking/blocking and inter-process calls.
Just to be clear: this is a potential architectural and performance problem I see in the code, not something I have actually experienced or tested.