optimize:performance code

This commit is contained in:
pengfei.zhou
2021-07-08 10:57:08 +08:00
committed by osborn
parent a40413f991
commit 34876de69f
2 changed files with 15 additions and 7 deletions

View File

@@ -97,7 +97,7 @@ - (instancetype)init {
}.mutableCopy;
self.registry = [[DoricRegistry alloc] initWithJSEngine:self];
[self ensureRunOnJSThread:^() {
[_profile start:@"Init"];
[self.profile start:@"Init"];
self.timers = [[NSMutableDictionary alloc] init];
self.bridgeExtension = [DoricBridgeExtension new];
self.bridgeExtension.registry = self.registry;
@@ -105,7 +105,7 @@ - (instancetype)init {
[self initJSExecutor];
[self initDoricEnvironment];
self.initialized = YES;
[_profile end:@"Init"];
[self.profile end:@"Init"];
}];
[self.registry registerMonitor:[DoricDefaultMonitor new]];
}