mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:03:30 +02:00
Performance: Starting to remove biggest bottlenecks from digest cycle, filters.
Biggest are releasedAt and showAll, both consuming more than 1000ms (!).
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
var oboe = require('oboe')
|
||||
var _ = require('lodash')
|
||||
|
||||
module.exports = function DeviceServiceFactory($http, socket) {
|
||||
module.exports = function DeviceServiceFactory($http, socket, $filter) {
|
||||
var deviceService = {}
|
||||
|
||||
function Tracker($scope, options) {
|
||||
@@ -94,7 +94,11 @@ module.exports = function DeviceServiceFactory($http, socket) {
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE: For overall performance reasons, put all the filters here:
|
||||
data.stateSorting = getStateSorting(data.state)
|
||||
// TODO: i18n shortDate
|
||||
data.releasedAtFormatted = $filter('date')(data.releasedAt, 'yyyy/MM/dd - X')
|
||||
|
||||
}
|
||||
|
||||
// For convenience, add the sorting priority to each state
|
||||
|
||||
Reference in New Issue
Block a user