Title: [172998] trunk/Tools
- Revision
- 172998
- Author
- [email protected]
- Date
- 2014-08-26 23:58:51 -0700 (Tue, 26 Aug 2014)
Log Message
build.webkit.org/dashboard: Poor performance when there are broken builds at initial load time
https://bugs.webkit.org/show_bug.cgi?id=136281
Reviewed by Tim Horton.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
Track and expose whether the itertion is being loaded. Made update() a no-op if
the iteration is already being loaded.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotBuilderQueueView.js:
(BuildbotBuilderQueueView.prototype.update.appendBuilderQueueStatus): Instead of
loading everything at once, ask the queue to load a little more. We can always repeat
if we still don't have enough data.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:
(BuildbotQueue.prototype.loadMoreHistoricalIterations): Added a function that loads
10 more iterations intelligently.
Modified Paths
Diff
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotBuilderQueueView.js (172997 => 172998)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotBuilderQueueView.js 2014-08-27 06:56:54 UTC (rev 172997)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotBuilderQueueView.js 2014-08-27 06:58:51 UTC (rev 172998)
@@ -108,9 +108,7 @@
if (firstRecentUnsuccessfulIteration) {
// We have a failed iteration but no successful. It might be further back in time.
- // Update all the iterations so we get more history.
- // FIXME: It can be very time consuming to load all iterations, we should load progressively.
- queue.iterations.forEach(function(iteration) { iteration.update(); });
+ queue.loadMoreHistoricalIterations();
}
}
}
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js (172997 => 172998)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js 2014-08-27 06:56:54 UTC (rev 172997)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js 2014-08-27 06:58:51 UTC (rev 172998)
@@ -40,6 +40,7 @@
this.id = dataOrID;
this.loaded = false;
+ this.isLoading = false;
this.openSourceRevision = null;
this.internalRevision = null;
@@ -295,7 +296,13 @@
if (this.queue.buildbot.needsAuthentication && this.queue.buildbot.authenticationStatus === Buildbot.AuthenticationStatus.InvalidCredentials)
return;
+ if (this.isLoading)
+ return;
+
+ this.isLoading = true;
+
JSON.load(this.queue.baseURL + "/builds/" + this.id, function(data) {
+ this.isLoading = false;
this.queue.buildbot.isAuthenticated = true;
if (!data || !data.properties)
return;
@@ -303,6 +310,7 @@
this._updateWithData(data);
}.bind(this),
function(data) {
+ this.isLoading = false;
if (data.errorType === JSON.LoadError && data.errorHTTPCode === 401) {
this.queue.buildbot.isAuthenticated = false;
this.dispatchEventToListeners(BuildbotIteration.Event.UnauthorizedAccess);
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js (172997 => 172998)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js 2014-08-27 06:56:54 UTC (rev 172997)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js 2014-08-27 06:58:51 UTC (rev 172998)
@@ -152,6 +152,32 @@
);
},
+ loadMoreHistoricalIterations: function()
+ {
+ var indexOfFirstNewlyLoadingIteration;
+ for (var i = 0; i < this.iterations.length; ++i) {
+ if (indexOfFirstNewlyLoadingIteration !== undefined && i >= indexOfFirstNewlyLoadingIteration + BuildbotQueue.RecentIterationsToLoad)
+ return;
+ var iteration = this.iterations[i];
+ if (!iteration.finished)
+ continue;
+ if (iteration.isLoading) {
+ // Caller lacks visibility into loading, so it is likely to call this function too often.
+ // Give it a chance to analyze everything that's been already requested first, and then it can decide whether it needs more.
+ return;
+ }
+ if (iteration.loaded && indexOfFirstNewlyLoadingIteration !== undefined) {
+ // There was a gap between loaded iterations, which we've closed now.
+ return;
+ }
+ if (!iteration.loaded) {
+ if (indexOfFirstNewlyLoadingIteration === undefined)
+ indexOfFirstNewlyLoadingIteration = i;
+ iteration.update();
+ }
+ }
+ },
+
update: function()
{
this._load(this.baseURL, function(data) {
Modified: trunk/Tools/ChangeLog (172997 => 172998)
--- trunk/Tools/ChangeLog 2014-08-27 06:56:54 UTC (rev 172997)
+++ trunk/Tools/ChangeLog 2014-08-27 06:58:51 UTC (rev 172998)
@@ -1,5 +1,25 @@
2014-08-26 Alexey Proskuryakov <[email protected]>
+ build.webkit.org/dashboard: Poor performance when there are broken builds at initial load time
+ https://bugs.webkit.org/show_bug.cgi?id=136281
+
+ Reviewed by Tim Horton.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
+ Track and expose whether the itertion is being loaded. Made update() a no-op if
+ the iteration is already being loaded.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotBuilderQueueView.js:
+ (BuildbotBuilderQueueView.prototype.update.appendBuilderQueueStatus): Instead of
+ loading everything at once, ask the queue to load a little more. We can always repeat
+ if we still don't have enough data.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:
+ (BuildbotQueue.prototype.loadMoreHistoricalIterations): Added a function that loads
+ 10 more iterations intelligently.
+
+2014-08-26 Alexey Proskuryakov <[email protected]>
+
build.webkit.org/dashboard raises an exception when Trac RSS fails to load
https://bugs.webkit.org/show_bug.cgi?id=136283
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes