Skip to content

RC.1 Url Generation Performance Concerns #3361

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

Closed
1 of 3 tasks
calebeno opened this issue Mar 8, 2017 · 8 comments
Closed
1 of 3 tasks

RC.1 Url Generation Performance Concerns #3361

calebeno opened this issue Mar 8, 2017 · 8 comments
Milestone

Comments

@calebeno
Copy link

calebeno commented Mar 8, 2017

This is a:

  • Bug Report
  • Feature Request
  • General Query

My current version of UI-Router is: 1.0.0-beta.3
I am comparing this with version: 1.0.0-rc.1
My version of Angular is: 1.5.8

Bug Report

I am working on a large web application and we have been investigating some performance concerns in the client-side. Among other things, we have some concerns regarding the performance of ui-router, especially when it comes to link generation. We have parts of our application where we are generating 1000+ links in a list. These links (going to the same route) can have between 50-100 potential parameters. Generating this list has caused wait times between 10-20 seconds before successful rendering after stripping the application down to only loading the links without any of the additional content.

I have been doing a comparison between our current version (beta.3) and the newest version (rc.1) to see if the most recent version would have better performance. Unfortunately, rc.1 added to the load time instead of subtracting. I built a jsFiddle example and forked it so each used a different version of ui-router. Here are links to the jsFiddle examples and images taken from Chrome's timeline tools to compare:

Beta.3
http://jsfiddle.net/r1mm0fja/55/
beta-3 jsfiddle 1000 links

RC.1
http://jsfiddle.net/r1mm0fja/56/
rc-1 jsfiddle 1000 links

UI Router has been a great utility and we are glad to continue using it. However, I have some concern regarding this performance issue. We are able to create a workaround at this time by manually forming the link using string templating. Will there be an effort to address performance concerns like these before the final release of 1.0?

@christopherthielen christopherthielen added this to the 1.0.0-final milestone Mar 12, 2017
@samithaf
Copy link

@christopherthielen wonder #3370 is related to this defect as well?

@29er
Copy link

29er commented Mar 16, 2017

Yes it looks to be referring to same issue as #3370
We have temporarily removed all StateService.href calls and used other approaches for now.

@christopherthielen
Copy link
Contributor

I've done some optimizing. Is this level of perf acceptable for your app @calebeno ?

http://plnkr.co/edit/wPox4BWUVRGEtglO6zAH?p=preview

@calebeno
Copy link
Author

@christopherthielen That is a remarkable improvement! Thank you! When do you think rc.2 will be available?

@christopherthielen
Copy link
Contributor

I've stopped telling people when I think a release will happen because I'm always horribly wrong :)

@calebeno
Copy link
Author

That's fair : )

@samithaf
Copy link

samithaf commented Mar 19, 2017

@christopherthielen I modified your plunker to create 1000 states. With RC1 it takes 11652ms to bootstrap the application. But with your new changes it only takes 255ms. That is impressive 👍

@christopherthielen
Copy link
Contributor

@samithaf that's actually due to a different optimization: #3274 (comment)

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

4 participants