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

Issue 8585023: Avoid too many consecutive redraws on about:profiler while loading. (Closed)

Created:
9 years, 1 month ago by eroman
Modified:
9 years, 1 month ago
CC:
chromium-reviews, arv (Not doing code reviews)
Visibility:
Public.

Description

Avoid too many consecutive redraws on about:profiler while loading. Background: when first opening about:profiler, the browser sends data for each process as it becomes available. The UI responds to this by redrawing all the data. If there are a lot of processes then this can cause many conecutive repaints which slows things down. To avoid this, we now bulk together redraws on a 500ms timer (just for loading, not any user-initiated action). BUG=100992 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=110464

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -2 lines) Patch
M chrome/browser/resources/profiler.js View 3 chunks +48 lines, -2 lines 2 comments Download

Messages

Total messages: 3 (0 generated)
eroman
9 years, 1 month ago (2011-11-17 06:44:02 UTC) #1
jar (doing other things)
LGTM I had one question below... but it should not stop a checkin. http://codereview.chromium.org/8585023/diff/1/chrome/browser/resources/profiler.js File ...
9 years, 1 month ago (2011-11-17 07:02:42 UTC) #2
eroman
9 years, 1 month ago (2011-11-17 07:06:55 UTC) #3
http://codereview.chromium.org/8585023/diff/1/chrome/browser/resources/profil...
File chrome/browser/resources/profiler.js (right):

http://codereview.chromium.org/8585023/diff/1/chrome/browser/resources/profil...
chrome/browser/resources/profiler.js:1215: }.bind(this);
On 2011/11/17 07:02:42, jar wrote:
> curious qusetion: Do you need the .bind(this)?
> 
> Wouldn't the method get invoked in the same stack context ,and be able to
> pick-up the value of this implicitly?

|this| is a very weird beast in javascript. Whereas most variables are lexically
scoped as God intended, |this| is dynamically scoped. Since the function is
invoked later by way of the "setTimeout", the value of the |this| will be bound
to something different when it actually runs.

Powered by Google App Engine
This is Rietveld 408576698