⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 185690 in webkit


Ignore:
Timestamp:
Jun 17, 2015, 9:05:50 PM (11 years ago)
Author:
rniwa@webkit.org
Message:

Reading the list of analysis tasks is extremely slow
https://bugs.webkit.org/show_bug.cgi?id=146086

Reviewed by Darin Adler.

The bug was caused by Ember data requesting manifest.js hundreds of times.
Fetch it ahead of time in each route instead.

  • public/v2/app.js:

(App.AnalysisRoute.model):
(App.AnalysisTaskRoute.model):

Location:
trunk/Websites/perf.webkit.org
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Websites/perf.webkit.org/ChangeLog

    r185676 r185690  
     12015-06-17  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Reading the list of analysis tasks is extremely slow
     4        https://bugs.webkit.org/show_bug.cgi?id=146086
     5
     6        Reviewed by Darin Adler.
     7
     8        The bug was caused by Ember data requesting manifest.js hundreds of times.
     9        Fetch it ahead of time in each route instead.
     10
     11        * public/v2/app.js:
     12        (App.AnalysisRoute.model):
     13        (App.AnalysisTaskRoute.model):
     14
    1152015-06-17  Ryosuke Niwa  <rniwa@webkit.org>
    216
  • trunk/Websites/perf.webkit.org/public/v2/app.js

    r185594 r185690  
    11861186App.AnalysisRoute = Ember.Route.extend({
    11871187    model: function () {
    1188         return this.store.findAll('analysisTask').then(function (tasks) {
    1189             return Ember.Object.create({'tasks': tasks.sortBy('createdAt').toArray().reverse()});
     1188        var store = this.store;
     1189        return App.Manifest.fetch(store).then(function () {
     1190            return store.findAll('analysisTask').then(function (tasks) {
     1191                return Ember.Object.create({'tasks': tasks.sortBy('createdAt').toArray().reverse()});
     1192            });
    11901193        });
    11911194    },
     
    11951198    model: function (param)
    11961199    {
    1197         return this.store.find('analysisTask', param.taskId);
     1200        var store = this.store;
     1201        return App.Manifest.fetch(store).then(function () {
     1202            return store.find('analysisTask', param.taskId);
     1203        });
    11981204    },
    11991205});
Note: See TracChangeset for help on using the changeset viewer.