Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The MapsActivity's LiveData observer is not differential? #1

Open
MrCsabaToth opened this issue May 24, 2020 · 1 comment
Open

The MapsActivity's LiveData observer is not differential? #1

MrCsabaToth opened this issue May 24, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@MrCsabaToth
Copy link
Member

See af7d0f5

The observer on the LiveData seems to supply the whole series (from the point of lookback) every single time. I added extra logic to skip that over and don't overload the UI with redundant pins, but I should figure out a way to also not get that much data the first place, because this won't scale. Maybe we can re-query based on the timestamp of the latest received pin or something.

@MrCsabaToth MrCsabaToth added the enhancement New feature or request label May 24, 2020
@MrCsabaToth MrCsabaToth self-assigned this May 24, 2020
@MrCsabaToth
Copy link
Member Author

The situation might not be as bad as I thought. Apparently Firebase library layer could be smart enough to not actually transfer all the data all the time, but to grab what it already has from the local cache. So possibly it is only presented to the ViewModel / Repository layer as a complete list all the time, but on the wire only the differential data is transferred.

@MrCsabaToth MrCsabaToth changed the title The MapsActivity's LiveData observer is not differential The MapsActivity's LiveData observer is not differential? Jun 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant