mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-26 07:04:05 +08:00
Move string transform from Tramponline to Profiler Queue
Summary: public `RCTProfileTrampoline` (and consequently `RCTProfileTrampoline(Start|End)`) should be as lightweight as possible, since it's called for every BridgeModule's method invocation, so avoid doing any string processing there by dispatching it to Profiler queue. Reviewed By: jspahrsummers Differential Revision: D2625918 fb-gh-sync-id: 86a98d4cf727c3be20eebee0bf8437c502c6a42a
This commit is contained in:
committed by
facebook-github-bot-6
parent
e5b843834d
commit
0b5b0f9016
@@ -189,8 +189,7 @@ IMP RCTProfileGetImplementation(id obj, SEL cmd)
|
||||
RCT_EXTERN void RCTProfileTrampolineStart(id, SEL);
|
||||
void RCTProfileTrampolineStart(id self, SEL cmd)
|
||||
{
|
||||
NSString *name = [NSString stringWithFormat:@"-[%s %s]", class_getName([self class]), sel_getName(cmd)];
|
||||
RCT_PROFILE_BEGIN_EVENT(0, name, nil);
|
||||
RCT_PROFILE_BEGIN_EVENT(0, [NSString stringWithFormat:@"-[%s %s]", class_getName([self class]), sel_getName(cmd)], nil);
|
||||
}
|
||||
|
||||
RCT_EXTERN void RCTProfileTrampolineEnd(void);
|
||||
|
||||
Reference in New Issue
Block a user