[ReactNative] Add more markers and fix FPS graph

Summary:
@public

Add marker to show JavaScript download duration + flow arrows to show the origin
of the UI blocks being flushed.
Also fixed the condition on `RCTPerfStats`, UI and JS graphs were being created
at startup time, now they're just created on the first time they're shown.

Test Plan:
The markers:

{F22577660}

To check the FPS graph, enable it on the DevMenu, and it should appear initially
empty, instead of previously filled as before.
This commit is contained in:
Tadeu Zagallo
2015-06-17 14:03:50 -07:00
parent a48e9b4690
commit a885efe02d
3 changed files with 8 additions and 5 deletions

View File

@@ -979,7 +979,9 @@ RCT_EXPORT_METHOD(findSubviewIn:(NSNumber *)reactTag atPoint:(CGPoint)point call
[_pendingUIBlocksLock unlock];
// Execute the previously queued UI blocks
RCTProfileBeginFlowEvent();
dispatch_async(dispatch_get_main_queue(), ^{
RCTProfileEndFlowEvent();
RCTProfileBeginEvent();
for (dispatch_block_t block in previousPendingUIBlocks) {
block();