Avoid LayoutInflater in constructors

RESOLVED FIXED

Status

()

Firefox for Android
General
P1
normal
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: sriram, Assigned: sriram)

Tracking

unspecified
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(firefox11 fixed, fennec11+)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Using LayoutInflater will increase the time to load the UI. The same functionality can be used with <include/> and onFinishInflate(). It's better to remove the LayoutInflater used at various places.
Assignee: nobody → sriram
Priority: -- → P1
This will help startup time
(Assignee)

Comment 2

6 years ago
Created attachment 579872 [details] [diff] [review]
Patch

This patches uses <include/> and removes the LayoutInflation from most places.
While using profiler, I saw some performance win. Generally there is around 50-150ms faster UI on Nexus S and 5-20ms faster UI on Nexus.

The "onFinishInflate()" is called twice in pre-Honeycomb (or pre-ICS) phones -- reported here: http://www.androidadb.com/source/payforwarding-read-only/source/Android/GreenDroid/GreenDroid/src/greendroid/widget/ActionBar.java.html

I have a guard for the same.
Attachment #579872 - Flags: review?(mark.finkle)
Attachment #579872 - Flags: review?(mark.finkle) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/38d339e5cf53
https://hg.mozilla.org/mozilla-central/rev/38d339e5cf53
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
tracking-fennec: --- → 11+
status-firefox11: --- → fixed
You need to log in before you can comment on or make changes to this bug.