You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Performance] Improve Android Cold Boot TTI (Time To Interactive) #4656
The app takes a long time to become interactive on Android.
We know that the number of reports a user has can impact the severity.
List any benchmarks that show the severity of the issue
We can test this in an Android release build by using the CAPTURE_METRICS=true option in .env file and looking at the timeToInteractive metric after booting up the app (must be previously signed in).
@kidroca is there some way to use Flipper on a release build? I've found that these metrics are much different on dev builds which is why the alert method is used here.
Any updates made on the ReportScreen or it's children doesn't seem to affect this metric as the end mark for TTI happens before the ReportScreen mounts (or shortly after it starts mounting)
@kidroca is there some way to use Flipper on a release build? I've found that these metrics are much different on dev builds which is why the alert method is used here.
I'm not sure how, but it's probably possible, I remember I've done iOS prod builds where the dev menu is enabled
For Android you can switch between PROD and DEV js bundle from the menu and it makes a big difference
I've added marks for ReportActionsView.
Marks: LHN click -> RAV mount -> RAV layout, here's how they look using PROD js
the last 2 switches taking less time - these are switching back to one of the previous two reports
And here's the same for a DEV build
here I can't capture all interactions on a single screen, but they are similar to the one on the left 2.1sec, the last 2 are again switch backs
Just throwing this out there ... we have this issue to enable the new architecture. Part of that architecture, maybe less-talked-about than the new Fabric renderer, is called TurboModules. With the traditional React Native architecture all native modules had to be loaded up-front before the app would load and the JavaScript would start running. With TurboModules, native modules are lazy-loaded – that should bring forth some "free" reductions in TTI on cold boots
@roryabraham I feel like this issue live kind of in vacuum. Should we either make this a tracking issue for PRs/issues which are aimed to improve the app loading time or I think we might want to close this one out as Margelo already addressed some boot up changes and we might want to go in a direction of creating a specific issues for specific problems (similar as you have linked above - enable fabric to speed things up)
This issue is from august 2021 so I feel like it is a bit out of context at the moment. I think we could close this out, if you agree, feel free to close this one out.
I agree with @mountiny here. We should close this out and focus on items with clearer deliverables. As @mountiny stated, this issue is old and our boot time has come a long way since its creation. Furthermore, Improve Android Cold Boot TTI is a moving target
Land on some kind of realistic target together for how fast the app should open
Part of the problem with this issue is it's not clear how much faster things should be and an audit of where things are at would be a good place to start.
Activity
MelvinBot commentedon Aug 13, 2021
Triggered auto assignment to @bfitzexpensify (
External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.MelvinBot commentedon Aug 16, 2021
Triggered auto assignment to @Luke9389 (
Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.bfitzexpensify commentedon Aug 16, 2021
Upwork posting
kidroca commentedon Aug 16, 2021
I've managed to hook the flipper plugin to print this information instead of the Alert https://github.com/oblador/react-native-performance/blob/master/packages/flipper-plugin-performance/README.md
You can mark more events and they would appear on the timeline as well e.g. report selected -> report rendered
This also allows exporting and importing files to Flipper
FlipperExport.flipper.zip
marcaaron commentedon Aug 16, 2021
@kidroca is there some way to use Flipper on a release build? I've found that these metrics are much different on dev builds which is why the alert method is used here.
kidroca commentedon Aug 16, 2021
Any updates made on the ReportScreen or it's children doesn't seem to affect this metric as the end mark for TTI happens before the ReportScreen mounts (or shortly after it starts mounting)
I'm not sure how, but it's probably possible, I remember I've done iOS prod builds where the dev menu is enabled

For Android you can switch between PROD and DEV js bundle from the menu and it makes a big difference
I've added marks for ReportActionsView.

Marks: LHN click -> RAV mount -> RAV layout, here's how they look using PROD js
And here's the same for a DEV build

105 remaining items
melvin-bot commentedon Oct 18, 2022
Triggered auto assignment to @abekkala (
AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.roryabraham commentedon Oct 18, 2022
Just throwing this out there ... we have this issue to enable the new architecture. Part of that architecture, maybe less-talked-about than the new Fabric renderer, is called TurboModules. With the traditional React Native architecture all native modules had to be loaded up-front before the app would load and the JavaScript would start running. With TurboModules, native modules are lazy-loaded – that should bring forth some "free" reductions in TTI on cold boots
mountiny commentedon Oct 19, 2022
@roryabraham I feel like this issue live kind of in vacuum. Should we either make this a tracking issue for PRs/issues which are aimed to improve the app loading time or I think we might want to close this one out as Margelo already addressed some boot up changes and we might want to go in a direction of creating a specific issues for specific problems (similar as you have linked above - enable fabric to speed things up)
This issue is from august 2021 so I feel like it is a bit out of context at the moment. I think we could close this out, if you agree, feel free to close this one out.
JmillsExpensify commentedon Oct 19, 2022
@mountiny Agreed. I'll go ahead and link this one to the existing tracking issue.
roryabraham commentedon Oct 20, 2022
I agree with @mountiny here. We should close this out and focus on items with clearer deliverables. As @mountiny stated, this issue is old and our boot time has come a long way since its creation. Furthermore,
Improve Android Cold Boot TTIis a moving targetmarcaaron commentedon Oct 24, 2022
Idea for clearer deliverable ->
Part of the problem with this issue is it's not clear how much faster things should be and an audit of where things are at would be a good place to start.
roryabraham commentedon Oct 24, 2022
I agree @marcaaron, and think that this issue could be a great starting place.
kidroca commentedon Oct 26, 2022
I think we talked about multiget on a few occasions but we never really gave it a chance and it might boost performance
A brief summary of the idea is
multiGetoperation