Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: RCTConvert - allocate array with capacity #35490

Closed
wants to merge 2 commits into from

Conversation

vonovak
Copy link
Collaborator

@vonovak vonovak commented Nov 26, 2022

Summary

this is a trivial change that allocates the NSMutableArray with the correct capacity before it is filled

Changelog

[Internal] [Changed] - RCTConvertVecToArray - allocate array with capacity

Test Plan

tested locally: the code builds and runs as expected

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 26, 2022
@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,103,533 +0
android hermes armeabi-v7a 6,471,857 +0
android hermes x86 7,521,168 +0
android hermes x86_64 7,380,054 +0
android jsc arm64-v8a 8,968,359 +0
android jsc armeabi-v7a 7,699,467 +0
android jsc x86 9,030,658 +0
android jsc x86_64 9,508,690 +0

Base commit: ca1ae5c
Branch: main

@pull-bot
Copy link

PR build artifact for e91fe36 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.

@iBotPeaches
Copy link
Contributor

tested locally: the code builds and runs as expected

Doesn't look like its building :) - double check your syntax. I believe you have an extra [ in there.

@vonovak
Copy link
Collaborator Author

vonovak commented Nov 26, 2022

lol, since it was just a one-liner I didn't bother to create a branch and push from it locally, and just copy-pasted in the GH ui... well, now it's fixed. Thanks 👍

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: ca1ae5c
Branch: main

@pull-bot
Copy link

PR build artifact for 5ff140a is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.

@facebook-github-bot
Copy link
Contributor

@GijsWeterings has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @vonovak in e325c95.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Nov 28, 2022
OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this pull request May 22, 2023
Summary:
this is a trivial change that allocates the NSMutableArray with the correct capacity before it is filled

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[Internal] [Changed] - RCTConvertVecToArray - allocate array with capacity

Pull Request resolved: facebook#35490

Test Plan: tested locally: the code builds and runs as expected

Reviewed By: cipolleschi

Differential Revision: D41548050

Pulled By: GijsWeterings

fbshipit-source-id: a5b947331d6c5fffcfecc7c20c827f42442b1ab8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants