This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make JSStringToSTLString 23x faster (#26955)
Summary: In my app I have a case where I need to pass a very large string (45MB) between JS and native. This is obviously suboptimal, but… this is where I'm at. The main bottleneck to doing this turned out to be `jsi`'s `JSStringToSTLString()`, which was extremely slow. In my case, 4.7s to execute. After this change, 204ms. I don't really know C++, so I'm not sure this code is 100% correct and safe, and I bet it could be done even better by avoiding the extra memory allocation (would shave off another 70ms). ## Changelog [General] [Changed] - Make JSStringToSTLString 23x faster Pull Request resolved: #26955 Reviewed By: shergin Differential Revision: D19578728 Pulled By: motiz88 fbshipit-source-id: 2fbce83166953ce928f0a6aa36eed710bfe05383
- Loading branch information
Showing 1 changed file with 15 additions and 3 deletions.