You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by kf...@apache.org on 2017/09/07 08:45:00 UTC
[1/4] incubator-weex git commit: + [ios] update tracing
Repository: incubator-weex
Updated Branches:
refs/heads/0.16-dev 3f32c552d -> 5dbcb878d
+ [ios] update tracing
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/3c2ce63f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/3c2ce63f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/3c2ce63f
Branch: refs/heads/0.16-dev
Commit: 3c2ce63f3c250be16d9c630ad20b86f0ea6e9ae7
Parents: 5e245cc
Author: 齐山 <su...@163.com>
Authored: Fri Sep 1 17:27:34 2017 +0800
Committer: 齐山 <su...@163.com>
Committed: Fri Sep 1 17:27:34 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.h | 5 +++++
ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m | 11 +++++++++++
ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m | 4 ++++
3 files changed, 20 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3c2ce63f/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.h b/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.h
index 48c1eba..1ad53e7 100644
--- a/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.h
+++ b/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.h
@@ -148,4 +148,9 @@ typedef enum : NSUInteger {
*/
+ (void)commitTracingSummaryInfo:(NSDictionary *)info withInstanceId:(NSString *)instanceId;
+/**
+ * @discusstion destroy Traincg Task by Instance
+ * @param instanceId the instanceId.
+ */
++(void)destroyTraincgTaskWithInstance:(NSString *)instanceId;
@end
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3c2ce63f/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m b/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m
index e546bfc..17b46a0 100644
--- a/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m
+++ b/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m
@@ -494,4 +494,15 @@
}
}
++(void)destroyTraincgTaskWithInstance:(NSString *)instanceId
+{
+ if(![self isTracing]){
+ return ;
+ }
+ WXTracingTask *task = [[WXTracingManager sharedInstance].tracingTasks objectForKey:instanceId];
+ if(task){
+ [[WXTracingManager sharedInstance].tracingTasks removeObjectForKey:instanceId];
+ }
+}
+
@end
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3c2ce63f/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
index 2e13dbb..39645ca 100644
--- a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
+++ b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
@@ -44,6 +44,7 @@
#import "WXPrerenderManager.h"
#import "WXTracingManager.h"
#import "WXJSExceptionProtocol.h"
+#import "WXTracingManager.h"
NSString *const bundleUrlOptionKey = @"bundleUrl";
@@ -355,6 +356,8 @@ typedef enum : NSUInteger {
WXLogError(@"Fail to find instance!");
return;
}
+ [WXTracingManager destroyTraincgTaskWithInstance:self.instanceId];
+
[WXPrerenderManager removePrerenderTaskforUrl:[self.scriptURL absoluteString]];
[WXPrerenderManager destroyTask:self.instanceId];
@@ -375,6 +378,7 @@ typedef enum : NSUInteger {
if(url.length > 0){
[WXPrerenderManager addGlobalTask:url callback:nil];
}
+
}
- (void)forceGarbageCollection
[3/4] incubator-weex git commit: + [ios] delete code
Posted by kf...@apache.org.
+ [ios] delete code
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/32886adc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/32886adc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/32886adc
Branch: refs/heads/0.16-dev
Commit: 32886adca0d19b28ae70009badc8402402df90be
Parents: 3ec1484
Author: 齐山 <su...@163.com>
Authored: Wed Sep 6 23:33:19 2017 +0800
Committer: 齐山 <su...@163.com>
Committed: Wed Sep 6 23:33:19 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.m | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/32886adc/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.m b/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.m
index f05cac5..453cd41 100644
--- a/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.m
+++ b/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.m
@@ -142,7 +142,7 @@ static WXThreadSafeMutableDictionary *globalPerformanceDict;
@(WXFirstScreenJSFExecuteTime) : FIRSETSCREENJSFEXECUTETIME,
@(WXPTFirstScreenRender) : SCREENRENDERTIME,
@(WXPTAllRender) : TOTALTIME,
- @(WXPTBundleSize) : JSTEMPLATESIZE,
+ @(WXPTBundleSize) : JSTEMPLATESIZE
};
});
[2/4] incubator-weex git commit: + [ios] add performance for first
excute js and optimize prerender
Posted by kf...@apache.org.
+ [ios] add performance for first excute js and optimize prerender
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/3ec14843
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/3ec14843
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/3ec14843
Branch: refs/heads/0.16-dev
Commit: 3ec148430d5b452246f8836b181535597d3122fd
Parents: 3c2ce63
Author: 齐山 <su...@163.com>
Authored: Wed Sep 6 23:26:59 2017 +0800
Committer: 齐山 <su...@163.com>
Committed: Wed Sep 6 23:26:59 2017 +0800
----------------------------------------------------------------------
.../WeexSDK/Sources/Bridge/WXBridgeContext.m | 4 ++--
.../Sources/Manager/WXComponentManager.m | 1 +
.../WeexSDK/Sources/Module/WXPrerenderManager.m | 20 +++++++++-----------
ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.h | 1 +
ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.m | 3 ++-
.../Sources/Protocol/WXAppMonitorProtocol.h | 1 +
6 files changed, 16 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3ec14843/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m b/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m
index ca57dc2..7985fe5 100644
--- a/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m
+++ b/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m
@@ -441,7 +441,7 @@ _Pragma("clang diagnostic pop") \
} else {
args = @[instance, temp, options ?: @{}];
}
-
+ WX_MONITOR_INSTANCE_PERF_START(WXFirstScreenJSFExecuteTime, [WXSDKManager instanceForID:instance]);
WX_MONITOR_INSTANCE_PERF_START(WXPTJSCreateInstance, [WXSDKManager instanceForID:instance]);
[self callJSMethod:@"createInstance" args:args];
WX_MONITOR_INSTANCE_PERF_END(WXPTJSCreateInstance, [WXSDKManager instanceForID:instance]);
@@ -500,7 +500,7 @@ _Pragma("clang diagnostic pop") \
WXAssertParam(script);
WX_MONITOR_PERF_START(WXPTFrameworkExecute);
-
+
[self.jsBridge executeJSFramework:script];
WX_MONITOR_PERF_END(WXPTFrameworkExecute);
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3ec14843/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.m b/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.m
index 86ec447..55784b3 100644
--- a/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.m
+++ b/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.m
@@ -205,6 +205,7 @@ static NSThread *WXComponentThread;
[self _initRootCSSNode];
__weak typeof(self) weakSelf = self;
+ WX_MONITOR_INSTANCE_PERF_END(WXFirstScreenJSFExecuteTime, self.weexInstance);
[self _addUITask:^{
[WXTracingManager startTracingWithInstanceId:weakSelf.weexInstance.instanceId ref:data[@"ref"] className:nil name:data[@"type"] phase:WXTracingBegin functionName:@"createBody" options:@{@"threadName":WXTUIThread}];
__strong typeof(self) strongSelf = weakSelf;
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3ec14843/ios/sdk/WeexSDK/Sources/Module/WXPrerenderManager.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Module/WXPrerenderManager.m b/ios/sdk/WeexSDK/Sources/Module/WXPrerenderManager.m
index d7d51bd..90f1c7f 100644
--- a/ios/sdk/WeexSDK/Sources/Module/WXPrerenderManager.m
+++ b/ios/sdk/WeexSDK/Sources/Module/WXPrerenderManager.m
@@ -168,19 +168,15 @@ static NSString *const MSG_PRERENDER_SUCCESS = @"success";
self.maxCacheNumber = max;
}
}
-
-
- WXSDKInstance *instance = [[WXSDKInstance alloc] init];
- instance.needPrerender = YES;
- task.instance = instance;
- task.parentInstanceId = instanceId;
- task.url = url.absoluteString;
- task.isCache = isCache;
-
if(self.prerenderTasks && self.prerenderTasks.count<self.maxCacheNumber){
[self.prerenderTasks setObject:task forKey:[WXPrerenderManager getTaskKeyFromUrl:url.absoluteString]];
WXPerformBlockOnMainThread(^{
- [instance renderWithURL:url options:@{@"bundleUrl":url.absoluteString} data:nil];
+ WXSDKInstance *instance = [[WXSDKInstance alloc] init];
+ instance.needPrerender = YES;
+ task.instance = instance;
+ task.parentInstanceId = instanceId;
+ task.url = url.absoluteString;
+ task.isCache = isCache;
WXPrerenderManager *manager = [WXPrerenderManager sharedInstance];
__weak typeof(self) weakSelf = manager;
instance.onCreate = ^(UIView *view) {
@@ -198,6 +194,7 @@ static NSString *const MSG_PRERENDER_SUCCESS = @"success";
[weakSelf.prerenderTasks setObject:task forKey:[WXPrerenderManager getTaskKeyFromUrl:url.absoluteString]];
}
};
+ [instance renderWithURL:url options:@{@"bundleUrl":url.absoluteString} data:nil];
});
if(callback){
callback(@{@"url":url.absoluteString,@"message":MSG_PRERENDER_SUCCESS,@"result":@"success"});
@@ -237,7 +234,8 @@ static NSString *const MSG_PRERENDER_SUCCESS = @"success";
}
+ (BOOL)isTaskExist:(NSString *)url{
- return [[WXPrerenderManager sharedInstance]isTaskExist:url];
+
+ return [[WXPrerenderManager sharedInstance] isTaskExist:url];
}
- (BOOL)isTaskExist:(NSString *)url
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3ec14843/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.h b/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.h
index 60b6c6e..4ec0c07 100644
--- a/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.h
+++ b/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.h
@@ -31,6 +31,7 @@ typedef enum : NSUInteger {
// instance
WXPTJSDownload,
WXPTJSCreateInstance,
+ WXFirstScreenJSFExecuteTime,
WXPTFirstScreenRender,
WXPTAllRender,
WXPTBundleSize,
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3ec14843/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.m b/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.m
index aadb411..f05cac5 100644
--- a/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.m
+++ b/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.m
@@ -139,9 +139,10 @@ static WXThreadSafeMutableDictionary *globalPerformanceDict;
@(WXPTFrameworkExecute) : JSLIBINITTIME,
@(WXPTJSDownload) : NETWORKTIME,
@(WXPTJSCreateInstance) : COMMUNICATETIME,
+ @(WXFirstScreenJSFExecuteTime) : FIRSETSCREENJSFEXECUTETIME,
@(WXPTFirstScreenRender) : SCREENRENDERTIME,
@(WXPTAllRender) : TOTALTIME,
- @(WXPTBundleSize) : JSTEMPLATESIZE
+ @(WXPTBundleSize) : JSTEMPLATESIZE,
};
});
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3ec14843/ios/sdk/WeexSDK/Sources/Protocol/WXAppMonitorProtocol.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Protocol/WXAppMonitorProtocol.h b/ios/sdk/WeexSDK/Sources/Protocol/WXAppMonitorProtocol.h
index 761ba8e..74031c9 100644
--- a/ios/sdk/WeexSDK/Sources/Protocol/WXAppMonitorProtocol.h
+++ b/ios/sdk/WeexSDK/Sources/Protocol/WXAppMonitorProtocol.h
@@ -35,6 +35,7 @@
#define COMMUNICATETIME @"communicateTime"
#define SCREENRENDERTIME @"screenRenderTime"
#define TOTALTIME @"totalTime"
+#define FIRSETSCREENJSFEXECUTETIME @"firstScreenJSFExecuteTime"
#define CACHEPROCESSTIME @"cacheProcessTime"
#define CACHERATIO @"cacheRatio"
[4/4] incubator-weex git commit: Merge branch '0.16-dev' of
https://git-wip-us.apache.org/repos/asf/incubator-weex into 0.16-dev
Posted by kf...@apache.org.
Merge branch '0.16-dev' of https://git-wip-us.apache.org/repos/asf/incubator-weex into 0.16-dev
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/5dbcb878
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/5dbcb878
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/5dbcb878
Branch: refs/heads/0.16-dev
Commit: 5dbcb878d843acbcfa1cb109d0bfab27ded8b00c
Parents: 32886ad 3f32c55
Author: 齐山 <su...@163.com>
Authored: Thu Sep 7 16:44:00 2017 +0800
Committer: 齐山 <su...@163.com>
Committed: Thu Sep 7 16:44:00 2017 +0800
----------------------------------------------------------------------
android/gradle.properties | 5 +-
android/jacoco.gradle | 43 +++++++
.../playground/app/src/main/AndroidManifest.xml | 8 ++
.../alibaba/weex/util/CoverageDataDumper.java | 36 ++++++
.../alibaba/weex/util/JacocoCodeCoverage.java | 93 ++++++++++++++
android/sdk/libs/armeabi/libweexjsb.so | Bin 0 -> 22556 bytes
android/sdk/libs/armeabi/libweexjsc.so | Bin 7570392 -> 325660 bytes
android/sdk/libs/armeabi/libweexjss.so | Bin 0 -> 6754012 bytes
.../java/com/taobao/weex/WXEnvironment.java | 16 +++
.../java/com/taobao/weex/WXSDKInstance.java | 8 ++
.../weex/appfram/pickers/DatePickerImpl.java | 3 +-
.../com/taobao/weex/bridge/WXBridgeManager.java | 23 ++++
.../java/com/taobao/weex/bridge/WXParams.java | 9 ++
.../java/com/taobao/weex/common/WXConfig.java | 1 +
.../taobao/weex/ui/component/list/WXCell.java | 2 +-
dangerfile.js | 4 +-
test/pages/components/textarea-placeholder.vue | 62 ++++++++++
test/pages/include/navbar.vue | 121 +++++++++++++++++++
test/pages/include/navpage.vue | 62 ++++++++++
test/pages/modules/navigator-event.vue | 101 ++++++++++++++++
test/pages/modules/viewport-basic.vue | 62 ++++++++++
test/run.sh | 25 +++-
.../components/textarea-placeholder.test.js | 69 +++++++++++
test/scripts/modules/navigator-event.test.js | 51 ++++++++
test/scripts/modules/viewport-basic.test.js | 45 +++++++
test/scripts/util.js | 37 ++++++
26 files changed, 877 insertions(+), 9 deletions(-)
----------------------------------------------------------------------