Skip to content

[Code Health] Map features and card flicker on remote changes #2819

@gino-m

Description

@gino-m

Also:

Initial debugging reveals that GoogleMapsFragment.setFeatures() is called 5 times when an LOI is modified in the remote datastore:

2024-11-11 16:17:54.337  3951-3951  GoogleMapsFragment      com.google.android.ground            V  setFeatures() called with 5 features
2024-11-11 16:17:54.712  3951-3951  GoogleMapsFragment      com.google.android.ground            V  setFeatures() called with 5 features
2024-11-11 16:17:54.720  3951-3951  GoogleMapsFragment      com.google.android.ground            V  setFeatures() called with 5 features
2024-11-11 16:17:54.726  3951-3951  GoogleMapsFragment      com.google.android.ground            V  setFeatures() called with 6 features
2024-11-11 16:17:54.732  3951-3951  GoogleMapsFragment      com.google.android.ground            V  setFeatures() called with 6 features

While SurveyRepository.loadAndSyncSurveyWithRemote is called only once as expected. We may need to debounce or otherwise isolate changes to the local db to prevent the UI from getting thrashed.

Originally posted by @gino-m in #2728

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't workingtype: code healthImprovements to readability or robustness of codebase

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions