Pre-allocate Fabric views even when React is running in the UI Thread
Summary: Before D14297477, the pre-allocation of views was ONLY necessary when react was running in the JS Thread, this is because the batch of mount items used to contain mount items for creation of views. After D14297477, views are only created during pre-allocation, that means that pre-allocation of views need to be trated the same way independently the thread where it is running. Reviewed By: shergin Differential Revision: D14714933 fbshipit-source-id: 7bd19cd33b624a5b0daaafabb476bb06707eea17
This commit is contained in:
Родитель
6f4239b37c
Коммит
2777c6572a
|
@ -185,11 +185,6 @@ public class FabricUIManager implements UIManager, LifecycleEventListener {
|
|||
final String componentName,
|
||||
ReadableMap props,
|
||||
boolean isLayoutable) {
|
||||
if (UiThreadUtil.isOnUiThread()) {
|
||||
// There is no reason to allocate views ahead of time on the main thread.
|
||||
return;
|
||||
}
|
||||
|
||||
ThemedReactContext context = mReactContextForRootTag.get(rootTag);
|
||||
String component = sComponentNames.get(componentName);
|
||||
synchronized (mPreMountItemsLock) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче