cxfeng1 closed pull request #1443: [WEEX-571][iOS]peformance record, fix
createInstance time in snandbox
URL: https://github.com/apache/incubator-weex/pull/1443
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m
b/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m
index daa2609d7f..9b794c0e48 100644
--- a/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m
+++ b/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m
@@ -556,6 +556,8 @@ - (void)createInstance:(NSString *)instanceIdString
} else {
[sdkInstance.instanceJavaScriptContext
executeJavascript:jsBundleString];
}
+ WX_MONITOR_INSTANCE_PERF_END(WXPTJSCreateInstance, [WXSDKManager
instanceForID:instanceIdString]);
+ [sdkInstance.apmInstance onStage:KEY_PAGE_STAGES_LOAD_BUNDLE_END];
} else {
sdkInstance.callCreateInstanceContext = [NSString
stringWithFormat:@"instanceId:%@\noptions:%@\ndata:%@",instanceIdString,
newOptions,data];
[self callJSMethod:@"createInstanceContext"
args:@[instanceIdString, newOptions, data?:@[]] onContext:nil
completion:^(JSValue *instanceContextEnvironment) {
@@ -600,7 +602,8 @@ - (void)createInstance:(NSString *)instanceIdString
} else {
[sdkInstance.instanceJavaScriptContext
executeJavascript:jsBundleString];
}
-
+ WX_MONITOR_INSTANCE_PERF_END(WXPTJSCreateInstance,
[WXSDKManager instanceForID:instanceIdString]);
+ [sdkInstance.apmInstance
onStage:KEY_PAGE_STAGES_LOAD_BUNDLE_END];
}];
}
@@ -613,9 +616,9 @@ - (void)createInstance:(NSString *)instanceIdString
args = @[instanceIdString, jsBundleString, options ?: @{}];
}
[self callJSMethod:@"createInstance" args:args];
+ WX_MONITOR_INSTANCE_PERF_END(WXPTJSCreateInstance, [WXSDKManager
instanceForID:instanceIdString]);
+ [sdkInstance.apmInstance onStage:KEY_PAGE_STAGES_LOAD_BUNDLE_END];
}
- WX_MONITOR_INSTANCE_PERF_END(WXPTJSCreateInstance, [WXSDKManager
instanceForID:instanceIdString]);
- [sdkInstance.apmInstance onStage:KEY_PAGE_STAGES_LOAD_BUNDLE_END];
}
- (NSString *)_pareJSBundleType:(NSString*)instanceIdString
jsBundleString:(NSString*)jsBundleString
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services