This repository has been archived by the owner on Dec 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 970
tab index in state is not always accurate #14080
Labels
0.22.x-single-webview
Issue first seen on single-webview build against v0.22.x branch
initiative/perf
perf
QA/checked-Linux
QA/checked-macOS
QA/checked-Win64
QA/test-plan-specified
release-notes/exclude
Milestone
Comments
petemill
added a commit
that referenced
this issue
May 10, 2018
Fix #14080 Reintroduce `tabs.updateTabsStateForWindow` which should be called whenever we believe muon has new tab properties that we wouldn't have otherwise received events for. It seems that the only time this can happen anymore is when the index of tabs has changed because another tab, with a lower index, was moved or closed, so renamed the function `updateTabIndexesForWindow`. Also allows us to remove the call to dispatch the action `UPDATE_TAB` for each tab with modified properties, which was a performance issue. Instead, since we're only concerned with index change, we make sure that this is handled in the renderer on the appropriate events (tab inserted, removed, deleted, moved, pinned (which triggers moved)). Adds performance measuring for that function when using --debug-tab-events flag.
Should be fixed in next build |
petemill
added a commit
that referenced
this issue
May 10, 2018
Fix #14080 Reintroduce `tabs.updateTabsStateForWindow` which should be called whenever we believe muon has new tab properties that we wouldn't have otherwise received events for. It seems that the only time this can happen anymore is when the index of tabs has changed because another tab, with a lower index, was moved or closed, so renamed the function `updateTabIndexesForWindow`. Also allows us to remove the call to dispatch the action `UPDATE_TAB` for each tab with modified properties, which was a performance issue. Instead, since we're only concerned with index change, we make sure that this is handled in the renderer on the appropriate events (tab inserted, removed, deleted, moved, pinned (which triggers moved)). Adds performance measuring for that function when using --debug-tab-events flag.
petemill
added a commit
that referenced
this issue
May 10, 2018
Fix #14080 Reintroduce `tabs.updateTabsStateForWindow` which should be called whenever we believe muon has new tab properties that we wouldn't have otherwise received events for. It seems that the only time this can happen anymore is when the index of tabs has changed because another tab, with a lower index, was moved or closed, so renamed the function `updateTabIndexesForWindow`. Also allows us to remove the call to dispatch the action `UPDATE_TAB` for each tab with modified properties, which was a performance issue. Instead, since we're only concerned with index change, we make sure that this is handled in the renderer on the appropriate events (tab inserted, removed, deleted, moved, pinned (which triggers moved)). Adds performance measuring for that function when using --debug-tab-events flag.
This was referenced May 10, 2018
petemill
added a commit
that referenced
this issue
May 11, 2018
…e is now reliable Fix #14080 Reintroduce `tabs.updateTabsStateForWindow` which should be called whenever we believe muon has new tab properties that we wouldn't have otherwise received events for. It seems that the only time this can happen anymore is when the index of tabs has changed because another tab, with a lower index, was moved or closed, so renamed the function `updateTabIndexesForWindow`. Also allows us to remove the call to dispatch the action `UPDATE_TAB` for each tab with modified properties, which was a performance issue. Instead, since we're only concerned with index change, we make sure that this is handled in the renderer on the appropriate events (tab inserted, removed, deleted, moved, pinned (which triggers moved)). Adds performance measuring for that function when using --debug-tab-events flag.
petemill
added a commit
that referenced
this issue
May 11, 2018
…e is now reliable Fix #14080 Reintroduce `tabs.updateTabsStateForWindow` which should be called whenever we believe muon has new tab properties that we wouldn't have otherwise received events for. It seems that the only time this can happen anymore is when the index of tabs has changed because another tab, with a lower index, was moved or closed, so renamed the function `updateTabIndexesForWindow`. Also allows us to remove the call to dispatch the action `UPDATE_TAB` for each tab with modified properties, which was a performance issue. Instead, since we're only concerned with index change, we make sure that this is handled in the renderer on the appropriate events (tab inserted, removed, deleted, moved, pinned (which triggers moved)). Adds performance measuring for that function when using --debug-tab-events flag.
petemill
added a commit
that referenced
this issue
May 11, 2018
…e is now reliable Fix #14080 Reintroduce `tabs.updateTabsStateForWindow` which should be called whenever we believe muon has new tab properties that we wouldn't have otherwise received events for. It seems that the only time this can happen anymore is when the index of tabs has changed because another tab, with a lower index, was moved or closed, so renamed the function `updateTabIndexesForWindow`. Also allows us to remove the call to dispatch the action `UPDATE_TAB` for each tab with modified properties, which was a performance issue. Instead, since we're only concerned with index change, we make sure that this is handled in the renderer on the appropriate events (tab inserted, removed, deleted, moved, pinned (which triggers moved)). Adds performance measuring for that function when using --debug-tab-events flag.
petemill
added a commit
that referenced
this issue
May 11, 2018
…e is now reliable Fix #14080 Reintroduce `tabs.updateTabsStateForWindow` which should be called whenever we believe muon has new tab properties that we wouldn't have otherwise received events for. It seems that the only time this can happen anymore is when the index of tabs has changed because another tab, with a lower index, was moved or closed, so renamed the function `updateTabIndexesForWindow`. Also allows us to remove the call to dispatch the action `UPDATE_TAB` for each tab with modified properties, which was a performance issue. Instead, since we're only concerned with index change, we make sure that this is handled in the renderer on the appropriate events (tab inserted, removed, deleted, moved, pinned (which triggers moved)). Adds performance measuring for that function when using --debug-tab-events flag.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
0.22.x-single-webview
Issue first seen on single-webview build against v0.22.x branch
initiative/perf
perf
QA/checked-Linux
QA/checked-macOS
QA/checked-Win64
QA/test-plan-specified
release-notes/exclude
As reported at #14064 (comment), a tab's index in the state can get out of sync with muon. This is because there are different muon Tab events in a single-webview world that can affect index, and we need to make sure we call
updateTabsStateForWindow
.However, this function results in a performance hit since it not only updates the state, but causes a new
TAB_UPDATED
action to be fired for tab which has a detected change.After discussing with @bridiver it seems that all the properties it is comparing are not needed, since they would be handled by either
chrome-tabs-updated
or more specific events (such aspinned
).Therefore, we can remove the call to
TAB_UPDATED
insideupdateTabsStateForWindow
and simply make sure each tab's index is accurate.Test plan
Same as #14064
The text was updated successfully, but these errors were encountered: