+2015-11-19 Ryosuke Niwa <rniwa@webkit.org>
+
+ Perf dashboard always fetches charts JSON twice
+ https://bugs.webkit.org/show_bug.cgi?id=151483
+
+ Reviewed by Andreas Kling.
+
+ Only re-generate "runs" JSON via /api/runs/ when the cache doesn't exist in /data/ or the cached JSON is
+ obsolete (shouldRefetch is set true) or corrupt (the second closure).
+
+ * public/v2/app.js:
+ (App.Pane._fetch):
+
2015-11-18 Ryosuke Niwa <rniwa@webkit.org>
Internal perf dashboard takes forever to load
var useCache = true;
App.Manifest.fetchRunsWithPlatformAndMetric(this.get('store'), platformId, metricId, null, useCache)
.then(function (result) {
- if (result || result.shouldRefetch)
+ if (!result || !result.data || result.shouldRefetch)
self.refetchRuns(platformId, metricId);
- if (result)
+ else
self._didFetchRuns(result);
- }, this._handleFetchErrors.bind(this, platformId, metricId));
+ }, function () {
+ self.refetchRuns(platformId, metricId);
+ });
if (!this.get('inDashboard'))
this.fetchAnalyticRanges();
}