-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我可以贡献我的第一次PR么,关于OkHttp的使用和JSApi的bug #293
Comments
代码跑过测试用例(部分测试代码没实现没测试).准备直接更新上项目使用了. |
Merged
binarywang
pushed a commit
that referenced
this issue
Jul 31, 2017
* update travis settings * feat(okhttp): 修改okhttp底层调用方法 直接用OkHttpClient代替connect.使客户端单一化.Okhttp 自动管理连接池优化 * feat(log,jsApi): 添加log debug 标记明确下调用底层效果,修复jsAPI Lock 为null 问题 添加log debug 标记明确下调用底层效果,修复jsAPI Lock 为null 问题 #293
多谢 |
binarywang
pushed a commit
that referenced
this issue
Jul 31, 2017
* update travis settings * feat(okhttp): 修改okhttp底层调用方法 直接用OkHttpClient代替connect.使客户端单一化.Okhttp 自动管理连接池优化 * feat(log,jsApi): 添加log debug 标记明确下调用底层效果,修复jsAPI Lock 为null 问题 添加log debug 标记明确下调用底层效果,修复jsAPI Lock 为null 问题 #293 * fix(File): 修复文件关闭 修复文件关闭 * Update OkHttpMediaDownloadRequestExecutor.java
binarywang
pushed a commit
that referenced
this issue
Sep 2, 2017
* update travis settings * feat(okhttp): 修改okhttp底层调用方法 直接用OkHttpClient代替connect.使客户端单一化.Okhttp 自动管理连接池优化 * feat(log,jsApi): 添加log debug 标记明确下调用底层效果,修复jsAPI Lock 为null 问题 添加log debug 标记明确下调用底层效果,修复jsAPI Lock 为null 问题 #293
binarywang
pushed a commit
that referenced
this issue
Sep 2, 2017
* update travis settings * feat(okhttp): 修改okhttp底层调用方法 直接用OkHttpClient代替connect.使客户端单一化.Okhttp 自动管理连接池优化 * feat(log,jsApi): 添加log debug 标记明确下调用底层效果,修复jsAPI Lock 为null 问题 添加log debug 标记明确下调用底层效果,修复jsAPI Lock 为null 问题 #293 * fix(File): 修复文件关闭 修复文件关闭 * Update OkHttpMediaDownloadRequestExecutor.java
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
在实际使用中发觉发送消息和处理素材图文上下传文件二进制特别慢.
根据官方文档说OkHttp performs best when you create a single 和我以前使用的经验.
修改为OkHttpClient 直接替代ConnectionPool, OkHttpClient 底层会自动管理连接池而且效率性能特好(连接池默认5条,往后可以在ConfigStorage 添加设置连接池数量).
同时修改了文件的下载方法.直接使用OkHttp 底层 Okio 写入的方式(高性能且简单)
getJsapiTicket 这个接口里面的lock 实际调用为空.ReentrantLock 这个共享锁应该一个类只能有一个实例.
The text was updated successfully, but these errors were encountered: