react-native-macos/React/Modules
Frédéric Sagnes 4a3857ef1d Use JSStringCreateWithUTF8CString and skip NSString decoding when loading the bundle
Summary: public

Benchmarking our startup path has shown we spend a lot of time decoding strings (iPhone 4S / iPhone 5):

* reading a 2MB JS bundle: 35ms / 15ms
* decoding is to an `NSString`: 186ms / 78ms
* transforming that to a `JSString`: 29ms / 10ms

Instead of going through an `NSString` transformation, we generate a null-terminated bundle (0.1ms / 0.05ms to copy the data) and use `JSStringCreateWithUTF8CString` (121ms / 53ms) to generate the string. That makes decoding 70% faster.

Reviewed By: javache

Differential Revision: D2541140

fb-gh-sync-id: 09a016b8edfd46a9b62682c76705564d2024e75e
2015-10-16 08:11:25 -07:00
..
RCTAccessibilityManager.h Add Voice Over related change to AccessibilityManager. 2015-10-01 18:19:24 -07:00
RCTAccessibilityManager.m Implemented inline image support for <Text> 2015-10-08 11:56:25 -07:00
RCTAlertManager.h Remove an existing UIAlertViews when invalidating the RCTAlertManager 2015-09-18 08:45:27 -07:00
RCTAlertManager.m App Extension support 2015-09-22 10:46:26 -07:00
RCTAppState.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTAppState.m revert D2372548 to fix initial app state issue 2015-09-25 13:25:26 -07:00
RCTAsyncLocalStorage.h Remove isValid from RCTInvalidating 2015-08-14 01:57:18 -08:00
RCTAsyncLocalStorage.m Ran Convert > To Modern Objective C Syntax 2015-08-25 01:08:49 -08:00
RCTDevLoadingView.h [RCTDevLoadingView] Add ability to disable during development. 2015-09-04 03:46:06 -08:00
RCTDevLoadingView.m [RCTDevLoadingView] Add ability to disable during development. 2015-09-04 03:46:06 -08:00
RCTDevMenu.h Added toggle items to dev menu 2015-09-14 09:40:33 -07:00
RCTDevMenu.m Support start and stopping systrace from repl 2015-10-12 09:45:40 -07:00
RCTExceptionsManager.h Finish up the work to send through the error cookie 2015-09-17 18:15:27 -07:00
RCTExceptionsManager.m Finish up the work to send through the error cookie 2015-09-17 18:15:27 -07:00
RCTPointAnnotation.h [MapView] Support for annotation callouts, annotation press, callout presses and pin animation 2015-06-25 09:15:21 -08:00
RCTPointAnnotation.m [MapView] Support for annotation callouts, annotation press, callout presses and pin animation 2015-06-25 09:15:21 -08:00
RCTRedBox.h Converted RCTRedBox to a bridge module 2015-08-21 02:53:55 -07:00
RCTRedBox.m Log column number in RCTRedBox messages 2015-09-29 09:22:14 -07:00
RCTSourceCode.h Use JSStringCreateWithUTF8CString and skip NSString decoding when loading the bundle 2015-10-16 08:11:25 -07:00
RCTSourceCode.m Use JSStringCreateWithUTF8CString and skip NSString decoding when loading the bundle 2015-10-16 08:11:25 -07:00
RCTStatusBarManager.h Removed deprecated RCT_EXPORT + code paths 2015-06-05 09:58:25 -08:00
RCTStatusBarManager.m App Extension support 2015-09-22 10:46:26 -07:00
RCTTiming.h [ReactNative] Use a single DisplayLink held by the bridge 2015-04-15 07:07:48 -08:00
RCTTiming.m Pause JS DisplayLink if nothing to process. 2015-09-29 09:22:10 -07:00
RCTUIManager.h Add doc comment for mainScrollView 2015-08-21 04:00:03 -07:00
RCTUIManager.m Only handle accessibility notifications from the correct RCTAccessibilityManager 2015-10-08 04:00:41 -07:00