Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with performance after upgrade from 0.2.8 to 1 #3370

Closed
29er opened this issue Mar 15, 2017 · 6 comments
Closed

Issue with performance after upgrade from 0.2.8 to 1 #3370

29er opened this issue Mar 15, 2017 · 6 comments
Milestone

Comments

@29er
Copy link

29er commented Mar 15, 2017

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!

@samithaf
Copy link

samithaf commented Mar 15, 2017

I am experiencing the same and I have upgraded from 1.0.0-alpha.5 to 1.0.0-rc.1. Application bootstrap jumped from 1152ms to 2252ms. I have tested on latest Google Chrome on OSX.

I have downgraded the version 1.0.0-beta.3 and it's fixing the issue and bootstrap time is around ~1000 ms.

Please note that my application does a deep-link to a state depend on the user type on start up.
E.g.

/app/banking/investor/account/xxx/overview

@christopherthielen
Copy link
Contributor

@samithaf if you have a large number of states, registration is very slow in rc.1. This is tracked as #3274 which is fixed in master and will be included in rc.2.

@christopherthielen christopherthielen added this to the 1.0.0-rc.2 milestone Mar 17, 2017
@christopherthielen
Copy link
Contributor

I'll look into this before next release. This perf regression is totally unacceptable.

@29er
Copy link
Author

29er commented Mar 17, 2017

thanks @christopherthielen !

@christopherthielen
Copy link
Contributor

Closing in favor of #3361

@samithaf
Copy link

@christopherthielen thanks for the confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants