mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Avoid copying samples list when serializing (#50985)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50985 # Changelog: [Internal] There may be tens of thousands of samples stored, so we should avoid copying it. I don't think we should restrict it from being copied, though, but we don't need it to copy in this case. Reviewed By: huntie, dannysu Differential Revision: D73106950 fbshipit-source-id: 45c027ea8bfc3424fe3428f5578d5bed3d1cdda9
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b08f87aa90
commit
996630b5b5
+1
-1
@@ -151,7 +151,7 @@ RuntimeSamplingProfile::Sample convertHermesSampleToTracingSample(
|
||||
/* static */ RuntimeSamplingProfile
|
||||
HermesRuntimeSamplingProfileSerializer::serializeToTracingSamplingProfile(
|
||||
const hermes::sampling_profiler::Profile& hermesProfile) {
|
||||
std::vector<hermes::sampling_profiler::ProfileSample> hermesSamples =
|
||||
const std::vector<hermes::sampling_profiler::ProfileSample>& hermesSamples =
|
||||
hermesProfile.getSamples();
|
||||
std::vector<RuntimeSamplingProfile::Sample> reconciledSamples;
|
||||
reconciledSamples.reserve(hermesSamples.size());
|
||||
|
||||
Reference in New Issue
Block a user