Summary:
To make React Native play nicely with our internal build infrastructure we need to properly namespace all of our header includes.
Where previously you could do `#import "RCTBridge.h"`, you must now write this as `#import <React/RCTBridge.h>`. If your xcode project still has a custom header include path, both variants will likely continue to work, but for new projects, we're defaulting the header include path to `$(BUILT_PRODUCTS_DIR)/usr/local/include`, where the React and CSSLayout targets will copy a subset of headers too. To make Xcode copy headers phase work properly, you may need to add React as an explicit dependency to your app's scheme and disable "parallelize build".
Reviewed By: mmmulani
Differential Revision: D4213120
fbshipit-source-id: 84a32a4b250c27699e6795f43584f13d594a9a82
Summary: Add some additional perf markers, and remove the usage of RCTProfileBlock as it completely breaks debugging / stepping in those blocks.
Reviewed By: majak
Differential Revision: D3579900
fbshipit-source-id: 8846dfc39b2448daa3669d5e1e8efb9096f183c5
Summary:Add a couple functions to show and hide a small window with buttons to start/stop
systrace and reload the current bridge. After stop profiling, the results will
be saved to a temporary file, and a share sheet will show up with the file attached
so that you can send it to your computer whatever way is more convenient.
Depends on D2700069
Reviewed By: jspahrsummers
Differential Revision: D2811560
fb-gh-sync-id: 5e91ece3a7ea748d4cb5fbc612a9b76ab80fc8f3
shipit-source-id: 5e91ece3a7ea748d4cb5fbc612a9b76ab80fc8f3
Summary:
public
Expose JS hooks to create flow events in systrace (the nice arrows to show async work flow) +
add support to the showing all the work enqueued from the JS thread as added in D2743733
Depends on D2743733
Reviewed By: jspahrsummers
Differential Revision: D2815293
fb-gh-sync-id: 4278f61a67a6e78cf2704bacce34b1389328c6df
Summary:
public
Expose JS hooks to create flow events in systrace (the nice arrows to show async work flow) +
add support to the showing all the work enqueued from the JS thread as added in D2743733
Depends on D2743733
Reviewed By: jspahrsummers
Differential Revision: D2773664
fb-gh-sync-id: 4a8854b17b4741b882f5f2cc425e4237a5e4b3eb
Summary:
public
Use the actual timestamp provided through `CADisplayLink` instead of the time
the handler is called.
Reviewed By: jspahrsummers
Differential Revision: D2739121
fb-gh-sync-id: 1da28190bb25351dc3dd94efaff21d49279a570f
Summary: public
Fixes#3953
Bail out soon when the profiler is not running + move string formating into the macro so that it happens in a background queue.
Reviewed By: jspahrsummers
Differential Revision: D2696167
fb-gh-sync-id: a1b91ee4459078ab9a4c0be62bd23362ec05e208
Summary: public
Rename it to `RCT_PROFILE_(BEGIN|END)_EVENT` to make it clearer that it's a macro,
since it has special behaviours.
Reviewed By: jspahrsummers
Differential Revision: D2631542
fb-gh-sync-id: 629c139462c4aa3582f719b14482017d13676e33
Summary: public
As jspahrsumemrs pointed out, `int` could overflow pretty easy, since it was static,
change it to an NSUInteger and downcast it when need to interop.
Reviewed By: jspahrsummers
Differential Revision: D2625902
fb-gh-sync-id: 2052be47a7b0ed81484da004fa18d6ef5baf26f7
Summary: public
The initial implementation used a lock to manage the stored profile information,
blocking the caller thread for longer than it should. Replace it with a private
queue, since the only thing we need to from the caller is to record the immediate
call time and the caller thread/queue, all the rest has absolutely no priority.
Use macros to also defer work done when generate the name of the events.
Reviewed By: nicklockwood
Differential Revision: D2603120
fb-gh-sync-id: e3e36160c893e7ae9ed3558f07c854ea76396661
Summary: public
The profiler overrides all the methods of all the BridgeModules, and in order to
`start` and `end` the profiler at the function invocation time it used `NSInvocation`,
which is slow.
Replace it with a simple assembly method based on `objc_msgSend`.
Reviewed By: jspahrsummers
Differential Revision: D2550807
fb-gh-sync-id: 88ca08f9d6bfcd3035bda9304c93566c8818b46f