Avoid copying vector in mounting layer of Fabric

Summary:
easy diff to avoid the constant copy of a vector when calling the method Binding.createRemoveAndDeleteMultiMountItem. Since we are not modifing the vector inside the method createRemoveAndDeleteMultiMountItem it's not necessary to copy it.

Changelog: Improve performance in mounting of Fabric views

Reviewed By: JoshuaGross

Differential Revision: D18250376

fbshipit-source-id: c984214a8148bab521cec51d42ba54a4b73e3e67
This commit is contained in:
David Vacca
2019-10-31 17:21:14 -07:00
committed by Facebook Github Bot
parent 2afc4e2482
commit 00266693b3
@@ -475,7 +475,7 @@ local_ref<JMountItem::javaobject> createDeleteMountItem(
local_ref<JMountItem::javaobject> createRemoveAndDeleteMultiMountItem(
const jni::global_ref<jobject> &javaUIManager,
std::vector<RemoveDeleteMetadata> metadata) {
const std::vector<RemoveDeleteMetadata> &metadata) {
auto env = Environment::current();
auto removeAndDeleteArray = env->NewIntArray(metadata.size()*4);