-
Notifications
You must be signed in to change notification settings - Fork 443
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
set.toPathValues should dedupe #71
Comments
@michaelbpaulson @jhusain do you anticipate this has an impact on the set*asPathValues methods? If so, how should we compare leaves wrt to metadata and values? I remember we toyed around with this idea earlier on and decided against, because it's difficult to meaningfully diff unknown datasets without exposing a comparator (which I'm not necessarily against). |
A comparator make sense to me. Otherwise we can use ===. JH
|
Falcor meeting: @michaelbpaulson : In set toPathValues just doesn't make sense. get double everything you do. @trxcllnt : set the things in the cache locally, do the network request and onNext what the network request returns @michaelbpaulson : I want the set to occur immediately on the client. But weird to be onNexted twice when the server response comes back. Needs more discussion as everyone seems a bit confused on how things are supposed to work. |
The right answer here is to dedupe values. Only onNext when value changes after server response comes back. For custom comparison we can use the compared API introduced for the observe method. |
We would use the same comparer function being added for #91 |
Related to issue #170 |
After talking through how
set.toPathValues.progressively
should work with @jhusain we realized that core.set should dedupe values. When the first set happens, with an onNext function provided, the core should call onNext every value it finds. If the model has_dedupePathValues
flag set, the onNext function should only onNext if the value coming in from set is different that the value in the cache.@trxcllnt does that sound reasonable?
The text was updated successfully, but these errors were encountered: