Skip to content

Commit 521011d

Browse files
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
1 parent d19cee3 commit 521011d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ReactCommon/jsiexecutor/jsireact/JSIExecutor.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,7 @@ void JSIExecutor::callFunction(
242242
// by value.
243243
auto errorProducer = [=] {
244244
std::stringstream ss;
245-
ss << "moduleID: " << moduleId << " methodID: " << methodId
246-
<< " arguments: " << folly::toJson(arguments);
245+
ss << "moduleID: " << moduleId << " methodID: " << methodId;
247246
return ss.str();
248247
};
249248

0 commit comments

Comments
 (0)