mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Avoid full copy of large folly::dynamic objects in JSIExecutor#defaultTimeoutInvoker [RFC]
Summary: Current creation of the errorProcessor lambda does a full copy of folly::dynamic object, which for large objects can cause 1000's of memory allocations, and thus increasing app's memory footprint and speed. Changelog: [General][Fixed] - Avoid full copy of large folly::dynamic objects in JSIExecutor#defaultTimeoutInvoker Reviewed By: sammy-SC Differential Revision: D38368392 fbshipit-source-id: 88579a7069891828cf6dae130c4964db6b494565
This commit is contained in:
committed by
Lorenzo Sciandra
parent
a0ae1fb525
commit
9424d2c85c
@@ -244,8 +244,7 @@ void JSIExecutor::callFunction(
|
||||
// by value.
|
||||
auto errorProducer = [=] {
|
||||
std::stringstream ss;
|
||||
ss << "moduleID: " << moduleId << " methodID: " << methodId
|
||||
<< " arguments: " << folly::toJson(arguments);
|
||||
ss << "moduleID: " << moduleId << " methodID: " << methodId;
|
||||
return ss.str();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user