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

Issue 6240001: Stop rebuilding the task manager list view after every new row added. (Closed)

Created:
9 years, 11 months ago by Andrew T Wilson (Slow)
Modified:
9 years, 7 months ago
Reviewers:
Jay Civelli
CC:
chromium-reviews
Visibility:
Public.

Description

Stop rebuilding the task manager list view after every new row added. BUG=69391 TEST=Create lots of new tabs, bring up task manager, should be fast. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=71815

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -4 lines) Patch
M chrome/browser/ui/views/task_manager_view.cc View 1 chunk +14 lines, -4 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Andrew T Wilson (Slow)
Please take a look - we were doing a superfluous rebuild of the ListView many ...
9 years, 11 months ago (2011-01-12 23:33:42 UTC) #1
Jay Civelli
9 years, 11 months ago (2011-01-15 00:21:57 UTC) #2
OK

On Wed, Jan 12, 2011 at 3:33 PM,  <atwilson@chromium.org> wrote:
> Reviewers: Jay Civelli,
>
> Message:
> Please take a look - we were doing a superfluous rebuild of the ListView
> many
> times when bringing up Task Manager initially, as a workaround for a Windows
> bug
> that doesn't affect the current incarnation of the UI anyway.
>
> Description:
> Stop rebuilding the task manager list view after every new row added.
>
>
> BUG=69391
> TEST=Create lots of new tabs, bring up task manager, should be fast.
>
> Please review this at http://codereview.chromium.org/6240001/
>
> SVN Base: svn://svn.chromium.org/chrome/trunk/src
>
> Affected files:
>  M chrome/browser/ui/views/task_manager_view.cc
>
>
> Index: chrome/browser/ui/views/task_manager_view.cc
> diff --git a/chrome/browser/ui/views/task_manager_view.cc
> b/chrome/browser/ui/views/task_manager_view.cc
> index
>
4953308c937007cd97ae6522d7d2a5831553feb1..921a0a0c5d9db791dc38228af09c7696c6fae790
> 100644
> --- a/chrome/browser/ui/views/task_manager_view.cc
> +++ b/chrome/browser/ui/views/task_manager_view.cc
> @@ -181,10 +181,20 @@ void TaskManagerTableModel::OnItemsAdded(int start,
> int length) {
>   if (observer_)
>     observer_->OnItemsAdded(start, length);
>   // There's a bug in the Windows ListView where inserting items with groups
> -  // enabled puts them in the wrong position, so we just rebuild the list
> view
> -  // in this case.
> -  // (see:
> http://connect.microsoft.com/VisualStudio/feedback/details/115345/)
> -  OnModelChanged();
> +  // enabled puts them in the wrong position, so we will need to rebuild
> the
> +  // list view in this case.
> +  // (see:
> http://connect.microsoft.com/VisualStudio/feedback/details/115345/).
> +  //
> +  // Turns out, forcing a list view rebuild causes http://crbug.com/69391
> +  // because items are added to the ListView one-at-a-time when initially
> +  // displaying the TaskManager, resulting in many ListView rebuilds. So we
> are
> +  // no longer forcing a rebuild for now because the current UI doesn't use
> +  // groups - if we are going to add groups in the upcoming TaskManager UI
> +  // revamp, we'll need to re-enable this call to OnModelChanged() and also
> add
> +  // code to avoid doing multiple rebuilds on startup (maybe just generate
> a
> +  // single OnModelChanged() call after the initial population).
> +
> +  // OnModelChanged();
>  }
>
>  void TaskManagerTableModel::OnItemsRemoved(int start, int length) {
>
>
>

Powered by Google App Engine
This is Rietveld 408576698