You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ky...@apache.org on 2019/07/17 08:32:46 UTC
[incubator-weex] branch master updated: [Android] add bigCell
detail msg for analyzer on debug performance mode (#2719)
This is an automated email from the ASF dual-hosted git repository.
kyork pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git
The following commit(s) were added to refs/heads/master by this push:
new 1245432 [Android] add bigCell detail msg for analyzer on debug performance mode (#2719)
1245432 is described below
commit 12454320800541b50b79bc41bfde3543ef6bc87b
Author: chen <lu...@users.noreply.github.com>
AuthorDate: Wed Jul 17 16:32:41 2019 +0800
[Android] add bigCell detail msg for analyzer on debug performance mode (#2719)
---
.../sdk/src/main/java/com/taobao/weex/common/WXPerformance.java | 4 ++--
.../src/main/java/com/taobao/weex/ui/component/WXComponent.java | 7 +++++++
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java b/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java
index 1a8532a..aeb1ffb 100644
--- a/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java
+++ b/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java
@@ -145,8 +145,8 @@ public class WXPerformance {
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public static final String CACHE_TYPE = "cacheType";
- public static final int VIEW_LIMIT_HEIGHT = WXViewUtils.getScreenHeight() / 2;
- public static final int VIEW_LIMIT_WIDTH = WXViewUtils.getScreenWidth() / 2;
+ public static final int VIEW_LIMIT_HEIGHT = WXViewUtils.getScreenHeight() /3*2;
+ public static final int VIEW_LIMIT_WIDTH = WXViewUtils.getScreenWidth() /3*2;
public static boolean TRACE_DATA = WXEnvironment.isApkDebugable();
/**
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
index 3029828..bcfa4a2 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
@@ -75,6 +75,7 @@ import com.taobao.weex.dom.WXEvent;
import com.taobao.weex.dom.WXStyle;
import com.taobao.weex.dom.transition.WXTransition;
import com.taobao.weex.layout.ContentBoxMeasurement;
+import com.taobao.weex.performance.WXAnalyzerDataTransfer;
import com.taobao.weex.performance.WXInstanceApm;
import com.taobao.weex.tracing.Stopwatch;
import com.taobao.weex.tracing.WXTracing;
@@ -975,6 +976,12 @@ public abstract class WXComponent<T extends View> extends WXBasicComponent imple
if (this instanceof WXCell && realHeight >= WXPerformance.VIEW_LIMIT_HEIGHT && realWidth>=WXPerformance.VIEW_LIMIT_WIDTH){
mInstance.getApmForInstance().updateDiffStats(WXInstanceApm.KEY_PAGE_STATS_CELL_EXCEED_NUM,1);
mInstance.getWXPerformance().cellExceedNum++;
+ if (WXAnalyzerDataTransfer.isOpenPerformance){
+ WXAnalyzerDataTransfer.transferPerformance(getInstanceId(),"details",WXInstanceApm.KEY_PAGE_STATS_CELL_EXCEED_NUM,
+ String.format("cell:[w:%d,h:%d],attrs:%s,styles:%s",realWidth,realHeight,getAttrs(),getStyles())
+ );
+ }
+
}
mAbsoluteY = (int) (nullParent ? 0 : mParent.getAbsoluteY() + getCSSLayoutTop());