Tencent / Hardcoder

Hardcoder is a solution which allows Android APP and Android System to communicate with each other directly, solving the problem that Android APP could only use system standard API rather than the hardware resource of system.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

每次请求前都需要重新initHardCoder吗?

nugongshou110 opened this issue · comments

使用华为P20测试,每次请求后,socket链接会自动断开, 难道每次需要重新再创建socket链接吗?

同一个进程的话不需要。
华为目前的 rom 有个限制,每个 app 创建的 socket 连接不能超过三个(后面会改这个问题),如果超过三个的话会断开连接,是不是这个问题呢?

我用华为P20手机测试时,发现每次startPerformance之后, socket链接就会断开,需要重新建链才可以下一次start,否则就失败了

@SophiaGuo 同有上述问题 测试机型华为nova3e
并且从testapp 上的log来看 有时开启hc 运行反而更慢了?
2019-10-14 13:44:17.482 25182-25413/com.tencent.mm.hardcoder.testapp I/hardcoder.MainActivity: startPerformance, ret:36853296 take 4065 ms
2019-10-14 13:44:30.635 25182-25420/com.tencent.mm.hardcoder.testapp I/hardcoder.MainActivity: startPerformance, ret:0 take 3906 ms

HC对比测试比较受当前CPU状态影响哈,所以需要测试多次。
目前更新了testapp,增加了打开webview的场景,增加了多次自动测试的接口。