-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor FXIOS-9353 #20714 Improving BVC viewDidLoad #24487
Conversation
firefox-ios/Client/Frontend/Browser/BrowserViewController/Views/BrowserViewController.swift
Outdated
Show resolved
Hide resolved
firefox-ios/Client/Frontend/Browser/BrowserViewController/Views/BrowserViewController.swift
Outdated
Show resolved
Hide resolved
firefox-ios/Client/Frontend/Browser/BrowserViewController/Views/BrowserViewController.swift
Outdated
Show resolved
Hide resolved
firefox-ios/Client/Frontend/Browser/BrowserViewController/Views/BrowserViewController.swift
Outdated
Show resolved
Hide resolved
firefox-ios/Client/Frontend/Browser/BrowserViewController/Views/BrowserViewController.swift
Outdated
Show resolved
Hide resolved
firefox-ios/Client/Frontend/Browser/BrowserViewController/Views/BrowserViewController.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't had a chance to exercise this branch thoroughly but the changes look Ok to me 👍 , my only minor concern is that offloading some of this might introduce hard-to-replicate edge cases. Might be a good idea to get a 2nd reviewer sign-off, but otherwise lgtm
+ fix some stuff that needs to be on the main thread
Move telemetry in the telemetry tracking class
40f776b
to
1a33cf9
Compare
Okkk. I made some updates and removed the non essential UI function (using a The only offloading is related to telemetry now. Impact should be minimal. Load time is slightly improved by 15 ms with this PR 🤷♀️ I'll take that, better than nothing! |
…ozilla-mobile#24487) * Try to improve viewDidLoad * Remove UISearchController init from startpath, wasn't even needed + fix some stuff that needs to be on the main thread * Remove redundant call to updateToolbarStateForTraitCollection Move telemetry in the telemetry tracking class * Update - Move Search bar telemetry to the trackStartUpTelemetry function - Move updateCreditCardAutofillStatus into main.async - Remove commented code - Move setupNotifications back to setupEssentialUI since we dont want race conditions * Create setupNonEssentialUI function * Remove non essential UI + change to Task(priority:) for background telemetry queue
That is good @lmarceau it is still an improvement 🎉 |
📜 Tickets
Jira ticket
Github issue
💡 Description
I started profiling the start up of the app, and this is a first attempt at improving the BVC load time since it has a big impact. This is a little step since we gotta start somewhere, and small incremental changes in that area makes more sense to ensure there's no breakage. My intent there is to move some things off the main thread when we first load BVC. I noticed:
UISearchController
under theAppStartUpTelemetry
, this had impact on launch time (see screenshot).updateToolbarStateForTraitCollection
was removed from theviewDidLoad
since it's also present inviewWillAppear
, so that seems like a duplicate call not needed.📝 Checklist
You have to check all boxes before merging
@Mergifyio backport release/v120
)