[ASRangeController] properly update _rangeTypeIndexPaths when adding/removing index paths and sections#1054
[ASRangeController] properly update _rangeTypeIndexPaths when adding/removing index paths and sections#1054knopp wants to merge 3 commits intofacebookarchive:masterfrom knopp:upstream
Conversation
…dexPaths prior to them Signed-off-by: Matej Knopp <matej.knopp@gmail.com>
Signed-off-by: Matej Knopp <matej.knopp@gmail.com>
|
@knopp thanks a lot, I can't tell you how awesome it is to have your help here - especially in the production implementation, as I'm hoping to get the Beta working well enough in the next several weeks, but still it will be a riskier direction for any production apps than fixing any holes in the Stable version. |
|
This issue is avoided by the recompute-everything architecture of the Beta controller, right? We are starting work soon on asynchronously applying the Display and FetchData ranges in the Beta version, on top of really substantial performance improvements I landed recently (I'd made a couple pretty stupid mistakes that just hadn't been tested through yet). You might try out Beta in your code and let me know if there are any immediate problems you detect. |
|
@appleguy, in a way this is also an issue with |
…ontroller is updating Signed-off-by: Matej Knopp <matej.knopp@gmail.com>
|
@knopp aha, ok. Yes I actually ran into that but fixed it by handling nil nodes and skipping over them in the Beta controller, so I'm pretty sure that is a stable / correct behavior for the newer one. Most important thing now is getting a new release out to fix this. |
|
@appleguy, which commit are you referring to? Also, are you sure that merely handling nil nodes is correct? When adding / removing nodes, the index paths in I think there are two possible solutions - either do what I did in the branch - update |
|
@knopp are you sure it won't behave correctly in the *Beta version? Very very interested in your thoughts there. For each index path, we independently check if it currently lies within each range. I think that should be sufficient, but I have not yet deeply considered this _editing vs _completed nodes issue. _editingExternalNodes was added after my original refactor of ASDataController and I'm actually pretty concerned about it, and will evaluate if it is possible to re-simplify some of that stuff. For this diff, do you have any test apps / test cases that you used? I want to get a fix for this issue out as quickly as possible, and I would believe that this approach addresses conditions that #1060 does not, but I am worried about pushing this out with minimal testing. Is there a scenario you can describe that does in fact break #1060 (or more importantly, *Beta, because it will become Stable within a couple weeks), but is addressed by this change? |
|
@appleguy, here is project that is broken with current Regarding We have node Now this happens between invocations of
The original node is still marked as visible, even though it no longer is. That is because the union of fetch, display, visible and |
|
It's probably not worth committing this. ASRangeControllerStable has other issues as well, so let's focus on ASRangeControllerBeta instead. |
|
@knopp ok, I'll take your advice. I tend to agree insofar as there is risk in changing code that is this fragile. |
This fixes #1028