问题描述
只是想知道哪个在性能和可用性方面更快?或者如果那里有更好的东西?
Just wondering which is faster in terms of performance and usability? Or if there's anything better out there?
推荐答案
这里有一些旧版本的性能信息:
There's some performance information relating to an old version here:
这是相当可比的。我不确定是否有更新版本的数据。
It's pretty comparable. I'm not sure if there are any figures for more recent versions.
请注意,最新的ASIHTTPRequest内置支持缓存(NSURLConnection不支持) - 如果你启用它并且它适用于你的使用它会让你获得一个主要的加速。
Note that the most recent ASIHTTPRequest has built in support for caching (which NSURLConnection doesn't) - if you enable that and it's applicable for your use it gets you a major speedup.
ASIHTTPRequest也为你做了很多免费的事情;例如,如果你想要它,它可以透明地处理HTTP代理身份验证。
ASIHTTPRequest also does a lot of things for you for free; it can transparently handle HTTP Proxy authentication if you want it to, for example.
我一直在NSURLConnection上选择ASIHTTPRequest:对我而言,缓存是真正的主要优势,但其他一切肯定都很好。
I pick ASIHTTPRequest over NSURLConnection all the time: for me the caching was the real major advantage, but everything else is certainly nice to have.
如果您决定使用ASIHTTPRequest,请使用最新的git master,而不是v1.7版本 - 后者有一些在取消请求时导致崩溃的错误以及在master中修复的一些其他问题。
If you do decide to use ASIHTTPRequest, do use the latest git master, not the v1.7 release - the latter has some bugs that cause crashing when cancelling requests and a few other issues which are fixed in master.
这篇关于ASIHTTPRequest vs NSURLConnection的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!