mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-09 17:13:46 +08:00
Backout D2677289 [react_native] View recycling in JS
Summary: public We're seeing related crashes. The diff has no tests, the perf tests weren't conclusive, and the person who'd be supporting it no longer is available to work on it. We can try this again later in a less rushed manner with proper perf testing. Reviewed By: davidaurelio Differential Revision: D2696615 fb-gh-sync-id: 3b6814ac12af19516146d5c42d2add8321b10db5
This commit is contained in:
committed by
facebook-github-bot-0
parent
bb11e05c33
commit
a636ddd9f0
@@ -124,22 +124,6 @@ public class UIImplementation {
|
||||
}
|
||||
}
|
||||
|
||||
public void dropViews(ReadableArray viewTags) {
|
||||
int size = viewTags.size(), realViewsCount = 0;
|
||||
int realViewTags[] = new int[size];
|
||||
for (int i = 0; i < size; i++) {
|
||||
int tag = viewTags.getInt(i);
|
||||
ReactShadowNode cssNode = mShadowNodeRegistry.getNode(tag);
|
||||
if (!cssNode.isVirtual()) {
|
||||
realViewTags[realViewsCount++] = tag;
|
||||
}
|
||||
mShadowNodeRegistry.removeNode(tag);
|
||||
}
|
||||
if (realViewsCount > 0) {
|
||||
mNativeViewHierarchyOptimizer.handleDropViews(realViewTags, realViewsCount);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Invoked by React to create a new node with a given tag has its properties changed.
|
||||
*/
|
||||
@@ -509,6 +493,7 @@ public class UIImplementation {
|
||||
|
||||
private void removeShadowNode(ReactShadowNode nodeToRemove) {
|
||||
mNativeViewHierarchyOptimizer.handleRemoveNode(nodeToRemove);
|
||||
mShadowNodeRegistry.removeNode(nodeToRemove.getReactTag());
|
||||
for (int i = nodeToRemove.getChildCount() - 1; i >= 0; i--) {
|
||||
removeShadowNode(nodeToRemove.getChildAt(i));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user