fastupload 0.2.3 vs. common file upload 1.2.2

前天发布了fastupload 0.2.3,没想到受到了大家的关注,下载量急剧上升。首先说明一下,写fastupload纯粹是个业余爱好,拿出来几行好的代码与大家分享,后来测试了一下,确实比Apache上的common file upload要快很多。放出来两组测试数据与测试代码,限于时间与水平关系,这里不做分析与评价,只看具体数据。

测试环境还是本人的小笔记本,与第一回里测试里所用的是一模一样的,测试代码有兴趣的可以从文后的附件中下载,有兴趣的读者可以亲自测试一下。

第一组,上传三个图片,分别是348k、331k、368k,fastupload的测试结果如下

//单位 ms
cost: 36
cost: 61
cost: 6
cost: 6
cost: 7
cost: 8
cost: 6
cost: 6
cost: 5
cost: 8
cost: 8
cost: 7
cost: 7
cost: 6
cost: 7
cost: 7
cost: 6
cost: 7
cost: 6
cost: 7
cost: 6
cost: 6
cost: 30
cost: 41
cost: 8
cost: 8
cost: 7
cost: 6
cost: 7


common file upload测试结果如下,单位也是ms

Apache Common File Upload costs: 121
Apache Common File Upload costs: 11
Apache Common File Upload costs: 13
Apache Common File Upload costs: 12
Apache Common File Upload costs: 8
Apache Common File Upload costs: 10
Apache Common File Upload costs: 9
Apache Common File Upload costs: 12
Apache Common File Upload costs: 8
Apache Common File Upload costs: 9
Apache Common File Upload costs: 8
Apache Common File Upload costs: 8
Apache Common File Upload costs: 9
Apache Common File Upload costs: 11
Apache Common File Upload costs: 13
Apache Common File Upload costs: 10
Apache Common File Upload costs: 12
Apache Common File Upload costs: 12
Apache Common File Upload costs: 9
Apache Common File Upload costs: 12
Apache Common File Upload costs: 8
Apache Common File Upload costs: 15
Apache Common File Upload costs: 10
Apache Common File Upload costs: 10
Apache Common File Upload costs: 8
Apache Common File Upload costs: 10
Apache Common File Upload costs: 9
Apache Common File Upload costs: 10
Apache Common File Upload costs: 10



第二组测试样本文件,27020246k, 26035095k, 26886326k的RAW照片, fastupload测试结果如下,单位ms

cost: 2589
cost: 2021
cost: 2042
cost: 1769
cost: 1872
cost: 2814
cost: 2319
cost: 1934
cost: 1758
cost: 1853
cost: 1993
cost: 1781
cost: 1887
cost: 1856
cost: 1939
cost: 1861
cost: 2572
cost: 1953
cost: 1898
cost: 1973


common file upload结果如下, 单位ms,其中有一次失败。

Apache Common File Upload costs: 2872
Apache Common File Upload costs: 2818
Apache Common File Upload costs: 3264
Apache Common File Upload costs: 2802
Apache Common File Upload costs: 2817
Apache Common File Upload costs: 2621
Apache Common File Upload costs: 2715
Apache Common File Upload costs: 2616
Apache Common File Upload costs: 2757
Apache Common File Upload costs: 2862
Apache Common File Upload costs: 3221
Apache Common File Upload costs: 2767
Apache Common File Upload costs: 2868
Apache Common File Upload costs: 2604
Apache Common File Upload costs: 2696
Apache Common File Upload costs: 2888
org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedly
.......
... 20 more
Apache Common File Upload costs: 2877
Apache Common File Upload costs: 3020
Apache Common File Upload costs: 2706
Apache Common File Upload costs: 2720

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值