Lazy init HomeBanner using ViewStub

RESOLVED FIXED in Firefox 30

Status

()

Firefox for Android
General
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: mfinkle, Assigned: Margaret)

Tracking

(Blocks: 2 bugs)

Trunk
Firefox 30
x86_64
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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.

Updated

4 years ago
Blocks: 906952
(Assignee)

Updated

4 years ago
Whiteboard: [mentor=margaret][lang=java]
(Assignee)

Comment 1

4 years ago
Created attachment 8390758 [details] [diff] [review]
Lazy init HomeBanner using ViewStub

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)
(Assignee)

Updated

4 years ago
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+
(Assignee)

Comment 3

4 years ago
(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.
https://hg.mozilla.org/mozilla-central/rev/c25710dd68ff
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 30
You need to log in before you can comment on or make changes to this bug.