yulingtianxia / AppOrderFiles

The easiest way to generate order files for Mach-O using Clang. Improving App Performance.
http://yulingtianxia.com/blog/2019/09/01/App-Order-Files/
MIT License
658 stars 128 forks source link

重排后貌似没什么效果 #4

Open solopiggy opened 5 years ago

solopiggy commented 5 years ago

测试数据(重排)

  1. EnterMain()—>1623.5341796875 coldLanuchFinished-->3591.0869140625
  2. EnterMain()—>1671.537841796875 coldLanuchFinished-->4203.284912109375
  3. EnterMain()—>1463.7109375 coldLanuchFinished-->3916.2109375
  4. EnterMain()—>1535.093994140625 coldLanuchFinished-->4235.630126953125
  5. EnterMain()—>1654.43505859375 coldLanuchFinished-->4197.576904296875
  6. EnterMain()—>1413.18115234375 coldLanuchFinished-->4113.499267578125

测试数据(非重排)

  1. EnterMain()—>1381.821044921875 coldLanuchFinished-->4133.60986328125
  2. EnterMain()—>1563.06591796875 coldLanuchFinished-->4042.641845703125
  3. EnterMain()—>1490.971923828125 coldLanuchFinished-->4021.407958984375
  4. EnterMain()—>1689.35498046875 coldLanuchFinished-->3937.9599609375
  5. EnterMain()—>1594.353271484375 coldLanuchFinished-->3975.540283203125

用模拟器跑了几次数据,发现差距并不明显

yulingtianxia commented 5 years ago

对的!

wangzhizhou commented 5 years ago

怎么测试对比重排前后的效果?

wangzhizhou commented 5 years ago

我这边也是重排后反而File Backed Page In次数变多了

wangzhizhou commented 5 years ago

这个貌似只有对全源码项目有作用,对于.a无效

wangzhizhou commented 5 years ago

看看这个,我现在正在试验把你的这个和另一个结合起来使用: https://github.com/rhythmkay/PGOAnalyzer

wangzhizhou commented 5 years ago

PGOAnalyzer是针对OC的二进制依赖做的,不过还得试过之后才能判断效果

Matthew1874 commented 4 years ago

@wangzhizhou 有符号表才有作用,而且本来启动耗时偏差就很大,这种二进制重排本来就收效甚微,被某条等厂大肆鼓吹罢了,我只是实在是不好意思揭下去了,毕竟那阵子是晋升季,不能再多说了,要得罪人了

你好, 有符号表才有作用---> 能不能详细说一下呢? 是指 dsym那种符号表吗? 谢谢

yulingtianxia commented 4 years ago

@Matthew1874 嗯可以这样理解

ianisme commented 3 years ago

@wangzhizhou 有符号表才有作用,而且本来启动耗时偏差就很大,这种二进制重排本来就收效甚微,被某条等厂大肆鼓吹罢了,我只是实在是不好意思揭下去了,毕竟那阵子是晋升季,不能再多说了,要得罪人了

mark一下,敢于说真话的人不多了,哈哈哈

yulingtianxia commented 3 years ago

@wangzhizhou 有符号表才有作用,而且本来启动耗时偏差就很大,这种二进制重排本来就收效甚微,被某条等厂大肆鼓吹罢了,我只是实在是不好意思揭下去了,毕竟那阵子是晋升季,不能再多说了,要得罪人了

mark一下,敢于说真话的人不多了,哈哈哈

然而我还是怂了,删了原评论哈哈