Closed Bug 762691 Opened 9 years ago Closed 9 years ago

Use single AndroidHttpClient for all favicon requests

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(firefox15 fixed)

RESOLVED FIXED
Firefox 16
Tracking Status
firefox15 --- fixed

People

(Reporter: bnicholson, Assigned: bnicholson)

References

Details

Attachments

(1 file)

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.
Attached patch patchSplinter Review
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
Attachment #631170 - Flags: review?(mark.finkle)
Comment on attachment 631170 [details] [diff] [review]
patch

Nice
Attachment #631170 - Flags: review?(mark.finkle) → review+
https://hg.mozilla.org/mozilla-central/rev/4663263e6dd7

(Merged by Ed Morley)
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 16
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
Attachment #631170 - Flags: approval-mozilla-aurora?
Attachment #631170 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Depends on: 774072
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.