Comments (8)
是这样的,命令行到sdk/platform-tools/systrace下,输入systrace命令:
python systrace.py --time=1 -o mynewtrace.html sched gfx view wm
然后马上开始你的操作,它会在1秒钟之后停止截取并输出文件。
这条命令意思就是:
- --time=1 监视接下来1秒的操作
- -o mynewtrace.html 文件存储到mynewtrace.html
- 检测Graphic, View, WindowManager,并输出Task名字
具体可以看参考3:systrace-doc
from android-ptr-comparison.
分析的太好了
from android-ptr-comparison.
@BlakeWL 谢谢,有什么建议随时交流:)
from android-ptr-comparison.
@desmond1121 原文“通过捕捉如下图中的操作持续1秒钟的systrace进行性能分析”,看gif图是1秒内快速上下滑动,这是代码控制频率的嘛,还是手动操作的?
from android-ptr-comparison.
是手动的,也可以通过代码。手动与代码各有得失(当然,手动非常简单),在重点看systrace中的各项时间分布,而不重点看具体时间时,我觉得手动足够展示出各个库的区别了。而时间分布确实是我本次考察的重点,因为各个开源库顶部视图不同,代码复杂程度也不同,只能通过trace时间分布的合理性来判断性能。
from android-ptr-comparison.
分析的挺好. SwipeRefreshLayout Google作者 也没有你这么细心.
from android-ptr-comparison.
@ronanhardiman 过奖了 这些库都是不错的,不过再好的东西也会有缺点,只要有心去发掘并改进就好了:)
from android-ptr-comparison.
@desmond1121 作者你好,我看代码的时候也留意到了这个View.bringToFront();方法,市面上很多下拉刷新的库都照搬这一句代码,请问你现在知道这有作用了吗?
from android-ptr-comparison.
Related Issues (4)
- 全新之作!可下拉刷新,可上拉加载!
- 建议 HOT 1
- 下拉体验对比
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-ptr-comparison.