-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
SO long story short, we made a big effort in our Angular 1.5+ app to upgrade to the 1.0 version of ui-router.( from 0.2.8 to 1.0.0-rc.1 ) Ever since the upgrade we have noticed terrible performance in our grids ( "angular-ui-grid": "3.0.7" )
After a week of performance testing (Chrome Dev Tools Timeline etc.), we were able to isolate one of the main issues as being from ui-router and the StateService.href function.
For example, in our datagrid, we create custom cell templates that just generate href routes to 'states' in the app. We use 'this.$state.href' (StateService.href) to do this.
There are a lot of cells in our grids that do this.
A quick example:
myCtorller.$inject = [ '$state', '$stateParams']
....
createCustomCellTemplate( para1, param2 ) {
return this.$state.href('app.myRoute', {
param1: para1,
param2: param2,
})
}
All browsers ( FF,IE,CHROME ) eventually freeze when we open up these grids. We tested by circumventing the ' this.$state.href' call and just hard coding href routes, and that made the performance MUCH better. The degradation of performance is so noticeable that we have discussed reverting back to the 0.2.8. , but I wanted to see if anyone else out there had also seen this and if you had any ideas on alternatives.
Thanks!