Performance improvements (#1166)

#1166 * Update angular libs
document-list: performance improvements
caching ‘heavy’ cell evaluations (i.e. date pipe)
code/test fixes
document-list: performance improvements
Removed ‘AfterViewChecked’ bottleneck as underlying data-table already
does it.
data-table: performance improvements
This commit is contained in:
Denys Vuika
2016-11-28 21:36:00 +00:00
committed by Eugenio Romano
parent 0f563e38bb
commit 3ca2c28a41
9 changed files with 223 additions and 235 deletions

View File

@@ -272,11 +272,6 @@ describe('DocumentList', () => {
expect(documentList.executeContentAction).not.toHaveBeenCalled();
});
it('should upgrade material design components', () => {
documentList.ngAfterViewChecked();
expect(componentHandler.upgradeAllRegistered).toHaveBeenCalled();
});
it('should subscribe to context action handler', () => {
spyOn(documentList, 'displayFolderContent').and.stub();
spyOn(documentList, 'contextActionCallback').and.stub();

View File

@@ -22,7 +22,6 @@ import {
Output,
EventEmitter,
AfterContentInit,
AfterViewChecked,
TemplateRef,
NgZone,
ViewChild,
@@ -41,15 +40,13 @@ import {
ImageResolver
} from './../data/share-datatable-adapter';
declare var componentHandler;
@Component({
moduleId: module.id,
selector: 'alfresco-document-list',
styleUrls: ['./document-list.css'],
templateUrl: './document-list.html'
})
export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit {
export class DocumentList implements OnInit, AfterContentInit {
static SINGLE_CLICK_NAVIGATION: string = 'click';
static DOUBLE_CLICK_NAVIGATION: string = 'dblclick';
@@ -196,16 +193,8 @@ export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit
return false;
}
ngAfterViewChecked() {
// workaround for MDL issues with dynamic components
if (componentHandler) {
componentHandler.upgradeAllRegistered();
}
}
isMobile(): boolean {
return !!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
}
getNodeActions(node: MinimalNodeEntity): ContentActionModel[] {