You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by so...@apache.org on 2017/02/28 02:30:13 UTC

[33/50] incubator-weex git commit: * [ios] change initSDKEnvironment monitor location

* [ios] change initSDKEnvironment monitor location


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/8113e957
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/8113e957
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/8113e957

Branch: refs/heads/0.11-dev
Commit: 8113e957be2f94af1811ab1e7f0a9d2e3300cb64
Parents: 639e51d
Author: \u9f50\u5c71 <su...@163.com>
Authored: Thu Feb 23 21:27:21 2017 +0800
Committer: \u9f50\u5c71 <su...@163.com>
Committed: Thu Feb 23 21:27:21 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8113e957/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m b/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m
index 1e0e7a3..4103f01 100644
--- a/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m
+++ b/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m
@@ -167,15 +167,11 @@
 
 + (void)initSDKEnvironment
 {
-    WX_MONITOR_PERF_START(WXPTInitalize)
-    WX_MONITOR_PERF_START(WXPTInitalizeSync)
     
     NSString *filePath = [[NSBundle bundleForClass:self] pathForResource:@"main" ofType:@"js"];
     NSString *script = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil];
     [WXSDKEngine initSDKEnvironment:script];
     
-    WX_MONITOR_PERF_END(WXPTInitalizeSync)
-    
 #if TARGET_OS_SIMULATOR
     static dispatch_once_t onceToken;
     dispatch_once(&onceToken, ^{
@@ -204,6 +200,10 @@
 
 + (void)initSDKEnvironment:(NSString *)script
 {
+    
+    WX_MONITOR_PERF_START(WXPTInitalize)
+    WX_MONITOR_PERF_START(WXPTInitalizeSync)
+    
     if (!script || script.length <= 0) {
         WX_MONITOR_FAIL(WXMTJSFramework, WX_ERR_JSFRAMEWORK_LOAD, @"framework loading is failure!");
         return;
@@ -213,6 +213,9 @@
         [self registerDefaults];
         [[WXSDKManager bridgeMgr] executeJsFramework:script];
     });
+    
+    WX_MONITOR_PERF_END(WXPTInitalizeSync)
+    
 }
 
 + (void)registerDefaults