As described in http://hc.apache.org/httpclient-3.x/performance.html#Reuse_of_HttpClient_instance, it's preferable to have a single HttpClient for all connections, as creating/closing the client is expensive.
Created attachment 631170 [details] [diff] [review] patch This patch does a few things: * Uses an AndroidHttpClient instead of an HttpClient. This automatically adds the client to a connection manager for us (so we don't have to worry about closing connections, being thread safe, etc) * Uses our Fennec user agent * Reuses the same HttpClient Some sample times (ms) of how long it takes to fetch the Google favicon when doing some searches: Before patch: 492, 568, 439, 553, 404, 394, 458 After patch: 255, 189, 80, 169, 61, 180, 94
Comment on attachment 631170 [details] [diff] [review] patch Nice
https://hg.mozilla.org/mozilla-central/rev/4663263e6dd7 (Merged by Ed Morley)
Comment on attachment 631170 [details] [diff] [review] patch [Approval Request Comment] Bug caused by (feature/regressing bug #): User impact if declined: Fennec UA isn't sent for favicon requests; favicons load slower Testing completed (on m-c, etc.): 1 week on m-c Risk to taking this patch (and alternatives if risky): low risk String or UUID changes made by this patch: none