Skip to content

Use computed property for versions length #109

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

Merged

Conversation

BlakeWilliams
Copy link
Contributor

A bug is causing versions to be fetched once for each version causing
excessive queries to slow down or freeze the page.

  • Turn versions.length into a computed property to prevent extra
    requests

This only happens when you visit from the search. I found this by looking for "hyper" and clicking the first link and experiencing unresponsiveness. I'm not totally sure, but I think this might be a result of having both a versions attribute that is null from the search and having a versions attribute in links.

This could probably be avoided altogether by passing version_ids instead of the objects or links in addition to coalescing the requests. If you decide to go that way and need some help on the Ember side I'm more than happy to help implement that.

A bug is causing `versions` to be fetched once for each version causing
excessive queries to slow down or freeze the page.

* Turn versions.length into a computed property to prevent extra
  requests
@huonw
Copy link
Member

huonw commented Jan 5, 2015

It seems like this might fix #107?

@BlakeWilliams
Copy link
Contributor Author

Yep! I should have checked the issues for it.

@alexcrichton
Copy link
Member

Awesome, thanks!

alexcrichton added a commit that referenced this pull request Jan 5, 2015
Use computed property for versions length
@alexcrichton alexcrichton merged commit df9d45b into rust-lang:master Jan 5, 2015
@alexcrichton
Copy link
Member

Hm, it looks like there's still 3 requests made for versions, but it's certainly better than N! I'll see if I can't find them.

@BlakeWilliams BlakeWilliams deleted the bmw-fix-versions-requests branch January 5, 2015 13:34
Turbo87 added a commit to Turbo87/crates.io that referenced this pull request Jan 4, 2023
This allows us to lookup specific files without having to mutate the `path` of the request.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants