Skip to content

Commit

Permalink
Improve test driver performance.
Browse files Browse the repository at this point in the history
Upgrading Underscore to 1.4.4 fixes a bug where _.throttle would sometimes take
double its timeout to deliver calls. So with this bugfix, our test suite
performs worse because reactivity happens more often. Reduce the throttling to
one update of the big table per second instead of twice a second. (Also, there's
no need to defer and call flush; the changed call does that!)
  • Loading branch information
glasser committed May 28, 2013
1 parent 15e190f commit 8e630c6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/test-in-browser/driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ var reportResults = function(results) {
countDeps.changed();
}

_.defer(_throttled_update);
_throttled_update();
};

// forget all of the events for a particular test
Expand All @@ -417,5 +417,4 @@ var forgetEvents = function (results) {

var _throttled_update = _.throttle(function() {
resultsDeps.changed();
Deps.flush();
}, 500);
}, 1000);

0 comments on commit 8e630c6

Please sign in to comment.