mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Avoid potential copies of TraceEvent before serialization (#52196)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52196 # Changelog: [Internal] Probably been overlooked for quite some time, but shouldn't be a bottleneck. Reviewed By: motiz88 Differential Revision: D77148271 fbshipit-source-id: e8eb32137086d6c280aab2ec5903be03f96175ad
This commit is contained in:
committed by
Facebook GitHub Bot
parent
823414e691
commit
448fe573e0
@@ -94,7 +94,7 @@ void PerformanceTracer::collectEvents(
|
||||
}
|
||||
|
||||
auto traceEvents = folly::dynamic::array();
|
||||
for (auto event : buffer_) {
|
||||
for (const auto& event : buffer_) {
|
||||
// Emit trace events
|
||||
traceEvents.push_back(serializeTraceEvent(event));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user