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

Fix DIM hanging when trying to show record books #1145

Merged
merged 1 commit into from Nov 7, 2016

Conversation

bhollis
Copy link
Contributor

@bhollis bhollis commented Nov 6, 2016

#1014 made a change to how we display objective rows, and included code to display a bubble for each Trials win. It did this with an ng-repeat over the range of an objective's completionValue. Unfortunately, in the RoI record book are objectives with completion values that can be in the thousands. This causes us to allocate a thousands-long array and then evaluate the template thousands of times. There's an ng-if making sure each of these doesn't get put into the document, but it's too late - it only happens after each element in the ng-repeat. Wrapping the items in a div that has the ng-if case (actually ng-switch, which fits better here) means we evaluate trials-ness only once per objective.

Fixes #1142.

/cc @kyleshay

@kyleshay
Copy link
Member

kyleshay commented Nov 6, 2016

whooops :) thanks for catching that.

@bhollis bhollis merged commit b1b278c into DestinyItemManager:dev Nov 7, 2016
@bhollis bhollis deleted the recordbookfix branch November 7, 2016 02:50
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.

None yet

2 participants