Closed Bug 968640 Opened 12 years ago Closed 12 years ago

Lazy init HomeBanner using ViewStub

Categories

(Firefox for Android Graveyard :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 30

People

(Reporter: mfinkle, Assigned: Margaret)

References

Details

Attachments

(1 file)

HomeBanner.<init> is showing up in our startup profiles. It's small, 1.1% (25ms), but it should not really need to inflate/init until we need to display it.
Blocks: 906952
Whiteboard: [mentor=margaret][lang=java]
Luckily, this isn't one of the many home banner bugs we need to try to uplift, but I figured I would fix it while I'm working in this code.
Assignee: nobody → margaret.leibovic
Attachment #8390758 - Flags: review?(lucasr.at.mozilla)
Whiteboard: [mentor=margaret][lang=java]
Comment on attachment 8390758 [details] [diff] [review] Lazy init HomeBanner using ViewStub Review of attachment 8390758 [details] [diff] [review]: ----------------------------------------------------------------- Nice. ::: mobile/android/base/home/HomeBanner.java @@ +69,5 @@ > > public HomeBanner(Context context, AttributeSet attrs) { > super(context, attrs); > > + LayoutInflater.from(context).inflate(R.layout.home_banner_content, this); Forgot to include home_banner_content in the patch?
Attachment #8390758 - Flags: review?(lucasr.at.mozilla) → review+
(In reply to Lucas Rocha (:lucasr) from comment #2) > Comment on attachment 8390758 [details] [diff] [review] > Lazy init HomeBanner using ViewStub > > Review of attachment 8390758 [details] [diff] [review]: > ----------------------------------------------------------------- > > Nice. > > ::: mobile/android/base/home/HomeBanner.java > @@ +69,5 @@ > > > > public HomeBanner(Context context, AttributeSet attrs) { > > super(context, attrs); > > > > + LayoutInflater.from(context).inflate(R.layout.home_banner_content, this); > > Forgot to include home_banner_content in the patch? It was just an hg rename of home_banner.xml, you can see it if you look at the raw patch.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 30
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: