Closed Bug 1146361 (iosstartuptime) Opened 10 years ago Closed 9 years ago

[meta] Improve startup time

Categories

(Firefox for iOS :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mfinkle, Unassigned)

References

(Depends on 1 open bug)

Details

(Keywords: perf)

Attachments

(2 files)

We should start profiling parts of the application, like startup. The orange startup splash displays for an uncomfortably long amount of time. Using 2014 iPod running iOS 8.2
Time Profiler from my iPhone 6, not that bad ~330ms with +~100ms in TabManager code
tracking-fennec: --- → ?
Keywords: perf
tracking-fennec: ? → +
Aaron can you measure again and see if things improved?
Flags: needinfo?(aaron.train)
No improvement. Finkle can check his iPod again.
Flags: needinfo?(aaron.train)
Attached file startup.trace.zip
Build #9 startup, iPhone 6 (8.3) Measured time from launch (suspended) through splash-screen to idle on about:home
Summary: Improve startup time → [meta] Improve startup time
Depends on: 1149678
Suggestion to shave of ~ 90ms Every time at app startup we create a UIWebView to get the User Agent and then modify it to include our own unique string. This is an expensive operation. We can assume that the User Agent only changes as part of an iOS upgrade so we should remember the current iOS version and user agent, compare the iOS version and skip the UIWebView creation if it is the same.
Suggestion to shave off 100s of ms When we restore your tabs, we ask the TabManager to create new tabs with a specific NSURL. This immediately creates a WKWebView instance. This is an extremely expensive operation. The more tabs people have open, the worse this gets. We should only fully restore the front tab. And restore the others lazily when they are opened.
Suggestion to shave off ~ 100ms BrowserViewController.viewDidLoad() takes about 200 ms. Half of that is the creation of the ReaderModeBarView. We should to create that view lazily when it is needed. Not always at app startup.
Can you file bugs for those things (and link them against this)?
In BrowserViewController.viewDidLoad we create a new tab if no tabs were restored. This tab will initially open with the home screen. Two things: Can we create the WKWebView for this tab lazily until the user opens a link? I think in BVC.animateToolbarsWithOffsets() we call layoutIfNeeded() twice: self.view.layoutIfNeeded() if animated { UIView.animateWithDuration(duration, animations: animation, completion: completion) } else { animation() } Can the above call to layoutIfNeeded() be moved into the 'if animated' block? I don't think it is needed if no animations are run?
I have been testing on an iPhone 6 and iPhone 5. Both are pretty fast. Like, a cold boot takes ~1.25 seconds. I would like to understand on what kind of device it takes many seconds to start.
Alias: iosstartuptime
Depends on: 1163210
Depends on: 1164486
Untracking the meta bug.
tracking-fennec: + → ---
No longer depends on: 1164486
Depends on: 1170581
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: