Accessing any usecase requires the entire dependency graph for all usecases to be initialized
Categories
(Fenix :: Performance, task)
Tracking
(firefox137 fixed)
Tracking | Status | |
---|---|---|
firefox137 | --- | fixed |
People
(Reporter: boek, Assigned: segun)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxdroid][group1])
Attachments
(2 files)
These get initialized immediately in FenixApplication::onCreate
Updated•9 days ago
|
Assignee | ||
Comment 1•7 days ago
|
||
Assignee | ||
Updated•7 days ago
|
Assignee | ||
Comment 2•7 days ago
|
||
Assignee | ||
Comment 3•7 days ago
•
|
||
Comment on attachment 9465983 [details]
app-startup-profile-before.png
During the Application's onCreate()
execution, we make one call to the UseCases
container, and that triggers the creation of all the dependencies of that class.
The creation of the UseCases
container, then further triggers the creation of AppStore
- which uses the PocketUpdatesMiddleware
as one of its middlewares. The creation of this class (and its dependencies) takes significant time, and it's not needed at all during startup as seen in this profile - https://share.firefox.dev/3CSiOh0 (also shown in this photo)
Making the dependencies of the UseCases
container lazy, and making the PocketStoriesService
(in PocketUpdatesMiddleware
) lazy helps to remove these unnecessary work from app startup
Assignee | ||
Comment 4•7 days ago
|
||
Assignee | ||
Comment 5•6 days ago
|
||
New perf compare link - thanks to :kaya for helping to fix the previous link.
Comment 7•3 days ago
|
||
bugherder |
Comment 8•3 days ago
|
||
bugherder |
Description
•