-
-
Notifications
You must be signed in to change notification settings - Fork 344
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
Don't call MapDataWithEditsSource listeners if nothing changed #4472
Don't call MapDataWithEditsSource listeners if nothing changed #4472
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some questions... also, should add tests as this is a critical section of code
Also:
but it's not doing more work and I think it's easier to read that way.
Thank you, yes!
app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/MapDataWithEditsSource.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/MapDataWithEditsSource.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/MapDataWithEditsSource.kt
Show resolved
Hide resolved
app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/MapDataWithEditsSource.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/MapDataWithEditsSource.kt
Show resolved
Hide resolved
app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/MapDataWithEditsSource.kt
Show resolved
Hide resolved
Co-authored-by: Tobias Zwick <newton@westnordost.de>
What should be tested:
|
In terms of numbers, I guess it is reasonable to claim 2x faster quest solving (with auto-sync on) and 2x faster upload times? |
necessary because edits do not refer to specific elements they edit anymore (i.e. they are more of a black box) incidentally this actually reimplements #4472
I added the tests, but the last one fails. |
Uhm, not sure I understand the problem. But |
Maybe I ran into the same problem as you when adding tests to the now dismissed #4481 PR. Shouldn't you be able to use It simulatest that the EditsController notifies the MapDataWithEditsSource class about new changes that have been added. |
Thanks! |
fixes #4077
This is a longer version of what was linked in #4077 (comment), but it's not doing more work and I think it's easier to read that way.