Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(861)

Issue 23708028: Reduce calling count of UpdateAppState() (Closed)

Created:
7 years, 3 months ago by simonhong_
Modified:
7 years, 2 months ago
CC:
chromium-reviews, sadrul, ben+watch_chromium.org, hyojun.im_lge.com
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Reduce calling count of UpdateAppState() When web page is loading, a lot of TabChangedAt() is called. That means a lot of UpdateAppState() is called, too. For example, loading google drive site causes almost more than 70 calling of TabChangedAt(). To replace TabChangedAt(), WebContentsObserver is used. TabDetachedAt() is replaced with TabClosingAt(). When tab is detached, there are two cases. The one case is tab is attached to other tab strip model. In this case, its LauncherItem is updated by ActiveTabChanged(). The other case is tab is closed. In this case TabClosingAt() can handle LauncherItem status. TabReplacedAt() is only used when tab is discarded when low memory condition is occurred. In this case, updating the launcher item status is not good because user don't need to know about discarding a tab. Also it is reloaded again when user selects discarded tab. R=skuhne@chromium.org BUG=NONE TEST=browser_tests, unit_tests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=226406

Patch Set 1 #

Total comments: 1

Patch Set 2 : Monitor active tab's webcontents by using WebContenetsObserver. #

Total comments: 10

Patch Set 3 : self refactoring #

Patch Set 4 : #

Total comments: 16

Patch Set 5 : #

Patch Set 6 : Add unittests for tab drag and drop. #

Patch Set 7 : Rebased #

Total comments: 6

Patch Set 8 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+221 lines, -78 lines) Patch
M chrome/browser/ui/ash/launcher/browser_status_monitor.h View 1 2 3 4 5 6 7 5 chunks +43 lines, -15 lines 0 comments Download
M chrome/browser/ui/ash/launcher/browser_status_monitor.cc View 1 2 3 4 5 6 7 4 chunks +126 lines, -61 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc View 1 2 3 4 5 6 7 4 chunks +9 lines, -2 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc View 1 2 3 4 5 6 7 1 chunk +43 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
simonhong_
Dear stefan, Please take a look. Thank you. Simon.
7 years, 3 months ago (2013-09-10 08:49:51 UTC) #1
Mr4D (OOO till 08-26)
Hmm. My first reaction was: Why do you not let the Monitor keep a map ...
7 years, 3 months ago (2013-09-10 21:57:00 UTC) #2
simonhong_
On 2013/09/10 21:57:00, Mr4D wrote: > Hmm. My first reaction was: Why do you not ...
7 years, 3 months ago (2013-09-10 22:36:21 UTC) #3
sky
https://codereview.chromium.org/23708028/diff/1/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (right): https://codereview.chromium.org/23708028/diff/1/chrome/browser/ui/browser.cc#newcode1920 chrome/browser/ui/browser.cc:1920: TabStripModelObserver::URL_CHANGING_ONLY); Your usage here is not entirely correct so ...
7 years, 3 months ago (2013-09-11 02:09:58 UTC) #4
simonhong_
Dear stefan, I monitored active tab's WebContents instead of adding new notification. Also some functions ...
7 years, 3 months ago (2013-09-12 17:24:14 UTC) #5
simonhong_
On 2013/09/12 17:24:14, Simon YoungKi Hong wrote: > Dear stefan, > I monitored active tab's ...
7 years, 3 months ago (2013-09-13 08:57:30 UTC) #6
Mr4D (OOO till 08-26)
A few more comments - but looks better then the first version! https://codereview.chromium.org/23708028/diff/11001/chrome/browser/ui/ash/launcher/browser_status_monitor.cc File chrome/browser/ui/ash/launcher/browser_status_monitor.cc ...
7 years, 3 months ago (2013-09-13 14:35:17 UTC) #7
simonhong_
Dear stefan, I refactored previous patch. Please check again! https://codereview.chromium.org/23708028/diff/11001/chrome/browser/ui/ash/launcher/browser_status_monitor.cc File chrome/browser/ui/ash/launcher/browser_status_monitor.cc (right): https://codereview.chromium.org/23708028/diff/11001/chrome/browser/ui/ash/launcher/browser_status_monitor.cc#newcode39 chrome/browser/ui/ash/launcher/browser_status_monitor.cc:39: ...
7 years, 3 months ago (2013-09-15 17:27:07 UTC) #8
Mr4D (OOO till 08-26)
Thanks for trying to reduce calls! Please have a look at my comments! Note: We ...
7 years, 3 months ago (2013-09-18 01:43:49 UTC) #9
simonhong_
Thank you for review! I uploaded new patch set and added some comments. Please check ...
7 years, 3 months ago (2013-09-18 13:38:38 UTC) #10
simonhong_
Dear stefan, I added additional unittests for tab drag and drop. Please check again.
7 years, 2 months ago (2013-09-30 14:02:09 UTC) #11
Mr4D (OOO till 08-26)
A few more comments. Please have a look! https://codereview.chromium.org/23708028/diff/33001/chrome/browser/ui/ash/launcher/browser_status_monitor.cc File chrome/browser/ui/ash/launcher/browser_status_monitor.cc (right): https://codereview.chromium.org/23708028/diff/33001/chrome/browser/ui/ash/launcher/browser_status_monitor.cc#newcode206 chrome/browser/ui/ash/launcher/browser_status_monitor.cc:206: DCHECK(new_contents); ...
7 years, 2 months ago (2013-10-01 03:20:33 UTC) #12
simonhong_
Dear stefan, Please check again! https://codereview.chromium.org/23708028/diff/33001/chrome/browser/ui/ash/launcher/browser_status_monitor.cc File chrome/browser/ui/ash/launcher/browser_status_monitor.cc (right): https://codereview.chromium.org/23708028/diff/33001/chrome/browser/ui/ash/launcher/browser_status_monitor.cc#newcode206 chrome/browser/ui/ash/launcher/browser_status_monitor.cc:206: DCHECK(new_contents); On 2013/10/01 03:20:33, ...
7 years, 2 months ago (2013-10-01 05:10:43 UTC) #13
Mr4D (OOO till 08-26)
lgtm
7 years, 2 months ago (2013-10-02 03:32:00 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/simon.hong81@gmail.com/23708028/43001
7 years, 2 months ago (2013-10-02 04:24:14 UTC) #15
commit-bot: I haz the power
7 years, 2 months ago (2013-10-02 06:54:30 UTC) #16
Message was sent while issue was closed.
Change committed as 226406

Powered by Google App Engine
This is Rietveld 408576698