Merge ~blr/maas:performance-tweaks into maas:master
Status: | Merged |
---|---|
Approved by: | Kit Randel |
Approved revision: | 01dfd83597221e7882318204d42e66675c550295 |
Merge reported by: | MAAS Lander |
Merged at revision: | not available |
Proposed branch: | ~blr/maas:performance-tweaks |
Merge into: | maas:master |
Diff against target: |
62 lines (+11/-2) 3 files modified
src/maasserver/static/js/angular/directives/machines_table.js (+9/-1) src/maasserver/static/partials/machines-table.html (+1/-1) src/maasserver/static/partials/nodes-list.html (+1/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Blake Rouse (community) | Approve | ||
Review via email: mp+366968@code.launchpad.net |
Commit message
Improve initial load performance of machine listing after data has been loaded (e.g. when navigating from other tabs).
Description of the change
This branch make several performance improvements to the machine listing view:
1. Add a guard to the machines $watch expression (and a new loading binding to the machines-table directive), only updating grouping on status changes after machines have finished loading.
2. Add a track by expression for the parent groupby ng-repeat.
3. Clear machines from the manager on init. While this may feel like a step backwards, with all cached machines the initial digest cycle is slow and grows linearly slower with the number of machines. When the cached machine data is available to the directive, angular will block until the digest cycle is complete, leaving the user with an unresponsive UI. This way at least, the user sees a heading, some markup and a loading indicator. Unfortunately we are not likely to workaround this inefficiency in the performance of nested ng-repeats without a rewrite.
Looks good.