Closed Bug 679927 Opened 14 years ago Closed 12 years ago

Use a two-stage throbber in Fennec

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: mbrubeck, Assigned: mbrubeck)

References

Details

(4 keywords)

Attachments

(3 files, 2 obsolete files)

Attached patch WIP (obsolete) — Splinter Review
Desktop firefox uses a two-state throbber to indicate whether a tab is still connecting, or has connected successfully and is loading (bug 602964). Doing the same for Fennec would have the following benefits: * Provides feedback on what is happening when pages don't load quickly * Brand/UX consistency with desktop Firefox This patch is a proof of concept. There's still some work left if we want to adopt this in Fennec: * We need new artwork. The patch uses artwork from the Mac "pinstripe" theme (scaled up from 16px to 32px), which is the wrong resolution and doesn't work well against our Fenenc's blue or green favicon backgrounds for SSL sites. * We don't want not to regress bug 539495 (high-frame-rate animated throbber uses too much CPU on mobile). * This patch replaces the current throbber.png which is also used in about:home and in the Add-on Manager when they are loading content. Do we want these to stay consistent with the page-load throbber, or do we want to keep using the old Fennec throbber in those locations? * I'm not sure if I like how this patch adds a message to the browser binding. There's a test Android build at https://people.mozilla.com/~mbrubeck/fennec-throbber.apk if anyone wants to try out this patch.
Attachment #553951 - Flags: ui-review?(madhava)
In bug 539495, we reduced the throbber's frame rate to 4fps because the previous version was using 50% CPU on N900. The current 4fps Fennec version uses about 5% CPU on my G2 while the desktop version (I don't know the frame rate) uses around 20-25% CPU on my G2. I pushed the patch to Try to see if this level of CPU usage has any effect on page load performance.
Using the desktop throbber does not seem to impact page load, so I think we can safely increase our frame rate to whatever they are using. The throbber shouldn't be visible long enough during normal use to impact battery life noticeably. http://tbpl.allizom.org/?tree=Try&usebuildbot=1&rev=3e7893fdaa51
Adding Ian to request artwork. We will need two 32x32 animated PNGs, one similar to the "connecting" animation from desktop Firefox: https://mxr.mozilla.org/mozilla-central/source/browser/themes/gnomestripe/browser/tabbrowser/connecting.png and one similar to the "loading" animation which is different on each platform: https://mxr.mozilla.org/mozilla-central/source/browser/themes/pinstripe/browser/tabbrowser/loading.png https://mxr.mozilla.org/mozilla-central/source/browser/themes/winstripe/browser/tabbrowser/loading.png https://mxr.mozilla.org/mozilla-central/source/browser/themes/gnomestripe/browser/tabbrowser/loading.png As far as I can tell, we should be able to use the same frame rate as the desktop versions (see comment 1 and comment 2). This animations appear in the urlbar end-cap, which has a light background for normal sites and a dark green or blue background for SSL sites.
Do we have tools to create animated PNGs? The last tool I used was Dolske's animated PNG add-on. You pass it some JS and it "makes" the animated PNG.
Stephen made the images we use in the desktop browser. He probably knows what should be done, and also probably has the files that were used for the desktop throbbers.
Mark, I have tools I've used in the past to build animated PNGs. I think it might actually be a firefox plugin where you upload images and it produces the animated png. Which might, in fact, be Dolske's add on :)
I've included two sizes here: 24x24 and 32x32 I believe the 32x32 spinners will look best on the phone versions of Fennec, but we may need to scale down to 24x24 on tablet. Let's try them and see.
Attached patch patch (obsolete) — Splinter Review
This patch uses the 24px icons on Honeycomb, and the 32px icons on Froyo and Gingerbread. There is a test build at http://people.mozilla.com/~mbrubeck/fennec-throbber2.apk The new spinners are hard to see against the blue favicon background for DV sites, and look a little weird against the green favicon background for EV sites. Maybe we could keep the background grey while the throbber is animating? I'll wait for a design decision from Ian before checking this in, but I think the code parts are ready for review.
Attachment #553951 - Attachment is obsolete: true
Attachment #553951 - Flags: ui-review?(madhava)
Attachment #561522 - Flags: ui-review?
Attachment #561522 - Flags: review?(mark.finkle)
Attachment #561522 - Flags: ui-review? → ui-review?(ibarlow)
Status: NEW → ASSIGNED
Keywords: uiwanted
Whiteboard: [has wip][needs artwork]
Comment on attachment 561522 [details] [diff] [review] patch There are no words for the joy I feel seeing these spinners. Let's just change our favicon background colours a bit so the spinners show up better. Blue - #b2bcf1 Green - #c4eb8a
Attachment #561522 - Flags: ui-review?(ibarlow) → ui-review-
(In reply to Ian Barlow (:ibarlow) from comment #12) > There are no words for the joy I feel seeing these spinners. Let's just > change our favicon background colours a bit so the spinners show up better. In the gingerbread and honeycomb themes, these are images and have an active state when pressed, for example: http://hg.mozilla.org/mozilla-central/raw-file/4ea7e2080666/mobile/themes/core/images/endcap-ssl-default-bg.png http://hg.mozilla.org/mozilla-central/raw-file/4ea7e2080666/mobile/themes/core/images/endcap-ssl-active-bg.png Do you want to provide updated images, or replace them with the same flat colors as the honeycomb theme..?
Some of the proposed spinners waste almost 1kb for iTXT comments.
Matt, I would like to update the background images, but in a separate bug please :)
(In reply to Max Stepin from comment #14) > Some of the proposed spinners waste almost 1kb for iTXT comments. Good catch, thanks! I'll make sure to pngcrush the files before pushing this patch.
Don't forget to rename extension to .apng before pngcrush, and then rename it back to .png after pngcrush. That way pngcrush will not remove apng chunks.
Comment on attachment 561522 [details] [diff] [review] patch I don't want to introduce "progress" events/callbacks unless we also start using the C++ browser filter (bug 474464). That should also wait for Fx10 IMO. For Fx9, UX would be happy with just using "the blue one" (ibarlow's words)
Attachment #561522 - Flags: review?(mark.finkle) → review-
Depends on: 688689
Depends on: 474464
Attached patch patch v2Splinter Review
Same code, rebased on top of the patches in bug 688689. > I don't want to introduce "progress" events/callbacks unless we also start > using the C++ browser filter (bug 474464). That should also wait for Fx10 > IMO. That bug has a non-working patch since 2009; it looks like the filter code isn't e10s-ready (see my comment in bug 474464). It's not clear to me that it's necessary either. When I pushed the patch in this bug to Try and ran the tp4m test several times, I did not see any noticeable regression. (The noise in that test makes it hard to say for sure without a lot more samples though.) This post says that OnProgress messages should be free from an IPC point of view, so the only perf impact would be from the JavaScript code in the content process (which 99% of the time will just return immediately in the first "if" expression): https://groups.google.com/d/msg/mozilla.dev.planning/Y72S3srGW2E/2PPdm4cheoEJ I'm happy to wait until Fx10 to land this, but I think we should try it as-is and back it out if there turns out to be a real performance hit.
Attachment #561522 - Attachment is obsolete: true
Attachment #562184 - Flags: review?(mark.finkle)
Comment on attachment 562184 [details] [diff] [review] patch v2 We can't take this as is. The backout for the 20fps spinner showed Android was affected on startup (Ts regressed ~200ms). I know for a fact that even empty OnProgress listeners hurt Tp on Android and Maemo. We need to use a different FPS on the spinner and we need the browser filter to throttle the OnProgress in C++. Even with those two changes I bet Ts and Tp are still affected - but hopefully not significantly.
Attachment #562184 - Flags: review?(mark.finkle) → review-
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
No longer depends on: 474464
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: