Skip to content
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

关于优化文件下载速度 #219

Open
lgxok opened this issue Apr 17, 2019 · 1 comment
Open

关于优化文件下载速度 #219

lgxok opened this issue Apr 17, 2019 · 1 comment

Comments

@lgxok
Copy link

lgxok commented Apr 17, 2019

文件下载很慢,至少比正常下载慢很多;测试了一下,好像主要是这里的参数问题
randomAccessFile = new RandomAccessFile(tempFile, "rws");//同步写入磁盘
改为
randomAccessFile = new RandomAccessFile(tempFile, "rw");//默认使用系统缓存加速
可以使速度快很多(至少是原来的两倍,文件越大越明显)

@Vanrevfront
Copy link

同感 下载速度真的比其他框架慢好几倍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants