Avoid sending unnecessary SESSIONS updates for placeholder tabs |
||
Issue descriptionThis is about a non-user-facing optimization that should reduce traffic to sync servers and reduce data usage, for Android users. Recent changes in crbug.com/851905 cause tab IDs to be stable across restarts on Android, which gets reflected in the sync protocol as |tab_id| protobuf field for both header and tab entities. For placeholder tabs (i.e. tabs that exist on Android but haven't been fully loaded, i.e. no WebContents), we have been sending regular updates because the tab ID could have changed, and it was important to keep this in sync with the header's content. Because tab IDs don't change, there's only one remaining field that we update for placeholder tabs: the window ID. Sending commits for the sole purpose of updating window IDs is wasteful, because nothing really makes use of that information. The tab/window hierarchy (i.e. calls to PutWindowInSession() and PutTabInWindow()) is built based on the header entity only.
,
Jul 30
I'll go ahead and land the last patch.
,
Jul 30
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f2fefd3a1a0fc41e0654f69d8ee01ca35cd0105b commit f2fefd3a1a0fc41e0654f69d8ee01ca35cd0105b Author: Mikel Astiz <mastiz@chromium.org> Date: Mon Jul 30 11:07:20 2018 Don't sync unnecessary updates for placeholder tabs Recent changes in crbug.com/851905 cause tab IDs to be stable across restarts on Android. This means there's only one remaining field that we update for placeholder tabs: the window ID. Nodoby really cares about the window ID field in tab entities, because the window/tab hierarchy is constructed using the header entity, where tab IDs are used as foreign keys to refer to tabs (independently of window IDs). Hence, let's avoid wasting data use and traffic to sync servers by simply letting the window IDs become stale in tab entities. Bug: 854493 Change-Id: I65b054d564fd47b4664d6376fda0f7ff799d259d Reviewed-on: https://chromium-review.googlesource.com/1107989 Commit-Queue: Mikel Astiz <mastiz@chromium.org> Reviewed-by: Marc Treib <treib@chromium.org> Cr-Commit-Position: refs/heads/master@{#579009} [modify] https://crrev.com/f2fefd3a1a0fc41e0654f69d8ee01ca35cd0105b/components/sync_sessions/local_session_event_handler_impl.cc [modify] https://crrev.com/f2fefd3a1a0fc41e0654f69d8ee01ca35cd0105b/components/sync_sessions/local_session_event_handler_impl.h [modify] https://crrev.com/f2fefd3a1a0fc41e0654f69d8ee01ca35cd0105b/components/sync_sessions/local_session_event_handler_impl_unittest.cc [modify] https://crrev.com/f2fefd3a1a0fc41e0654f69d8ee01ca35cd0105b/components/sync_sessions/session_sync_bridge_unittest.cc [modify] https://crrev.com/f2fefd3a1a0fc41e0654f69d8ee01ca35cd0105b/components/sync_sessions/sessions_sync_manager_unittest.cc
,
Sep 9
sync-triage-ping, any updates? Was the bug fixed in #3?
,
Sep 27
Right, this is fixed and seems to reduce commit traffic in about 30% on Clank! |
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Jun 20 2018