Skip to content
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

[Tabs] Add a persistent storage for Synced Tabs #3373

Closed
Tracked by #14294
jonalmeida opened this issue Jul 17, 2020 · 9 comments
Closed
Tracked by #14294

[Tabs] Add a persistent storage for Synced Tabs #3373

jonalmeida opened this issue Jul 17, 2020 · 9 comments
Assignees
Labels

Comments

@jonalmeida
Copy link
Collaborator

jonalmeida commented Jul 17, 2020

In Fenix, we want to pull the Synced Tabs feature up to the tabs tray to make it more visible and prominent to the user. A WIP screenshot of what this would look like:

Screen Shot 2020-07-17 at 3 34 34 AM

On a cold boot, we always seem to be retrieving the tabs from the network, so there is a long pause where we have nothing showing up if you go to the tabs tray the first time. We're trying to optimize perceived performance over accuracy of correct tabs (so we're asynchronously requesting new tabs for changes as well), but we would like to show a cached version first.

The feature request/question I'd like to bring up is if it would be prudent to having a persistent storage within the native Rust layer to provide the caching mechanism or if it should live in the a-c layer.

Some thoughts:

  • Synchronizing a database within the a-c and a-s layer can be a bit odd. We would have two copies of the state in different layers that need to be kept up-to-date.
  • Would this caching benefit other Synced Tab consumers in the future?
  • What are the perf losses/gains?
  • This affects the perceived perf of the tabs tray so we can use some smoke and mirrors until we have a better solution since it happens on the cold boot only. That is to say, this might not be a release blocker.
  • What are the constraints of the team for prioritization? We could build something out in a-c if it's quicker but might end up being duplicate work.

cc: @eoger

┆Issue is synchronized with this Jira Task
┆epic: Tabs improvements
┆sprintEndDate: 2022-03-04

@data-sync-user data-sync-user changed the title [Tabs] Add a persistent storage for Synced Tabs [Tabs] Add a persistent storage for Synced Tabs Jul 21, 2020
@eoger
Copy link
Contributor

eoger commented Jul 21, 2020

What's the timeline on this feature @jonalmeida ?

@jonalmeida
Copy link
Collaborator Author

jonalmeida commented Jul 22, 2020

@eoger we had already started the a-c and Fenix work to have this land by the end of the sprint, so this isn't blocking it. I think having a solution landed by the end of August is the current timeline to avoid the (perceived) perf loss.

@data-sync-user
Copy link
Collaborator

➤ Janet Dragojevic commented:

closing this as a feature request we never acted on.  Please reopen or file a new request if this becomes an active request.

@jonalmeida
Copy link
Collaborator Author

@jdragojevic I think we need to re-consider this feature request again with the new H1 work for Synced Tabs in Fenix.

@grigoryk
Copy link
Contributor

Another vote for doing this sooner rather than later. It'll certainly help with a variety of scenarios in Fenix.

@jonalmeida
Copy link
Collaborator Author

This will have an effect on FNXV2-19419 for Fenix (and might be an issue in the future).

@mhammond
Copy link
Member

This will have an effect on FNXV2-19419 for Fenix (and might be an issue in the future).

Just to make sure expectations are set here: this will only impact things when starting Fenix second and subsequent times after closing desktop. The first time after starting, persistence will mean the old set of tabs is available - we will still need to sync to get the new fresh set.

So in some ways it might make the experience appear worse

Now: Fenix starts, shows no synced tabs, but is syncing. Tabs then get shown, but are always fresh
Then: Fenix starts, shows stale tabs from when Fenix was last run. Is syncing, tabs get updated.

IOW, it's either "no tabs, or only fresh tabs" vs "stale tabs which update to fresh tabs".

I'm not suggesting we shouldn't do this though, but it's not going to be a panacea and fresh tabs for "jump back in" will always be somewhat delayed.

@jonalmeida
Copy link
Collaborator Author

jonalmeida commented Feb 14, 2022

Just to make sure expectations are set here: this will only impact things when starting Fenix second and subsequent times after closing desktop. The first time after starting, persistence will mean the old set of tabs is available - we will still need to sync to get the new fresh set.

Correct. Showing old tabs might be okay if we're sync-ing, followed by an update.

Now: Fenix starts, shows no synced tabs, but is syncing. Tabs then get shown, but are always fresh
Then: Fenix starts, shows stale tabs from when Fenix was last run. Is syncing, tabs get updated.

Having no synced tabs, and then adding the UI after it's done syncing results in existing content getting pushed down while you're trying to interact with the screen, and we've received bug reports about this already for other dynamic content on the home screen.

A possible UX fix on the Fenix side would be to show the old sync tab with a by-line of "Synced as of x time ago".

@mhammond
Copy link
Member

mhammond commented Mar 2, 2022

#4862 is merged so will be available in the next release, and mozilla-mobile/android-components#11799 is a PR to leverage it, so I think we can call this done.

@mhammond mhammond closed this as completed Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants