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

UI: Add a key to the alloc table on the task group detail page #8216

Merged
merged 1 commit into from
Jun 19, 2020

Conversation

DingoEatingFuzz
Copy link
Contributor

Adding keys tells Ember to rerender matching entries instead of destroying and recreating.

Without this key, every time the allocation collection changes, every allocation row gets destroyed and recreated.

This happens a lot, since each allocation needs to be reloaded which dirties the collection.

Since allocation rows fetch stats on init, each of these many many renders results in a stats request.

By using a key and rerendering matching records, this all goes away. Since the rows aren't being destroyed and recreated, the init stats request isn't being made overnumerously.

Before and after screenshots of a page with five running allocations and a list of 10+ total allocations.

Before: 181 stats requests, 10 of which are from steady-state polling.
image

After: 15 stats requests, 10 of which are from steady-state polling.
image

Adding keys tells Ember to rerender matching entries instead of
destroying and recreating.

Without this key, every time the allocation collection changes, every
allocation row gets destroyed and recreated.

This happens a lot, since each allocation needs to be reloaded which
dirties the collection.

Since allocation rows fetch stats on init, each of these many many
renders results in a stats request.

By using key and rerendering matching records, this all goes away. Since
the rows aren't being destroyed and recreated, the init stats request
isn't being made overnumerously.
@DingoEatingFuzz DingoEatingFuzz changed the title Add a key to the alloc table on the task group detail page UI: Add a key to the alloc table on the task group detail page Jun 19, 2020
@github-actions
Copy link

Ember Asset Size action

As of 6dfca71

Files that got Bigger 🚨:

File raw gzip
nomad-ui.js +16 B -1 B

Files that stayed the same size 🤷‍:

File raw gzip
auto-import-fastboot.js 0 B 0 B
vendor.js 0 B 0 B
nomad-ui.css 0 B 0 B
vendor.css 0 B 0 B

@github-actions
Copy link

Ember Test Audit comparison

master 6dfca71 change
passes 1425 1424 -1
failures 0 0 0
flaky 0 1 +1
duration 5m 14s 217ms 5m 17s 622ms +03s 405ms

Copy link
Contributor

@backspace backspace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the alleged flaky test isn’t from this but already exists in master. Would be nice for the audit comparison to actually report what fails… some day hopefully

@DingoEatingFuzz DingoEatingFuzz merged commit b3ba307 into master Jun 19, 2020
@DingoEatingFuzz DingoEatingFuzz deleted the b-ui/stats-request-thrashing branch June 19, 2020 20:37
@github-actions
Copy link

github-actions bot commented Jan 2, 2023

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants