Skip to content

wip: Grid(s) performance improvements #16049

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

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
91 changes: 91 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,97 @@
}
}
}
},
"igniteui-angular-performance": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"root": "projects/igniteui-angular-performance",
"sourceRoot": "projects/igniteui-angular-performance/src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular/build:application",
"options": {
"browser": "projects/igniteui-angular-performance/src/main.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "projects/igniteui-angular-performance/tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": [
"projects/igniteui-angular-performance/src/assets"
],
"styles": [
"projects/igniteui-angular-performance/src/styles.scss"
],
"stylePreprocessorOptions": {
"includePaths": ["node_modules"]
}
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kB",
"maximumError": "1MB"
},
{
"type": "anyComponentStyle",
"maximumWarning": "4kB",
"maximumError": "8kB"
}
],
"outputHashing": "all"
},
"development": {
"optimization": false,
"extractLicenses": false,
"sourceMap": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular/build:dev-server",
"configurations": {
"production": {
"buildTarget": "igniteui-angular-performance:build:production"
},
"development": {
"buildTarget": "igniteui-angular-performance:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular/build:extract-i18n"
},
"test": {
"builder": "@angular/build:karma",
"options": {
"polyfills": [
"zone.js",
"zone.js/testing"
],
"tsConfig": "projects/igniteui-angular-performance/tsconfig.spec.json",
"inlineStyleLanguage": "scss",
"assets": [
{
"glob": "**/*",
"input": "projects/igniteui-angular-performance/public"
}
],
"styles": [
"projects/igniteui-angular-performance/src/styles.scss"
]
}
}
}
}
},
"cli": {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"ng": "ng",
"start": "ng serve --open --hmr",
"start:elements": "ng serve --project igniteui-angular-elements",
"start:performance": "ng serve --project igniteui-angular-performance",
"build": "ng build --configuration production",
"test": "ng test igniteui-angular",
"lint": "ng lint",
Expand Down
Binary file not shown.
10 changes: 10 additions & 0 deletions projects/igniteui-angular-performance/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<main class="wrapper">
<div class="routes">
@for (route of routes; track $index) {
<button igxButton="contained" routerLink="/{{ route.path }}">
{{ route.title }}
</button>
}
</div>
<router-outlet />
</main>
18 changes: 18 additions & 0 deletions projects/igniteui-angular-performance/src/app/app.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
:host {
width: 100%;
height: 100%;
display: flex;
}

.wrapper {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}

.routes {
padding: 1rem;
display: flex;
gap: 1rem;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { AppComponent } from './app.component';

describe('AppComponent', () => {
let component: AppComponent;
let fixture: ComponentFixture<AppComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [AppComponent]
})
.compileComponents();

fixture = TestBed.createComponent(AppComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
14 changes: 14 additions & 0 deletions projects/igniteui-angular-performance/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Component } from '@angular/core';
import { RouterLink, RouterOutlet, Routes } from '@angular/router';
import { IgxButtonDirective } from 'igniteui-angular';
import { routes } from './app.routes';

@Component({
selector: 'app-root',
imports: [RouterOutlet, IgxButtonDirective, RouterLink],
templateUrl: './app.component.html',
styleUrl: './app.component.scss'
})
export class AppComponent {
protected routes: Routes = routes;
}
14 changes: 14 additions & 0 deletions projects/igniteui-angular-performance/src/app/app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { ApplicationConfig, provideBrowserGlobalErrorListeners, provideZoneChangeDetection } from '@angular/core';
import { provideRouter } from '@angular/router';
import { provideAnimations } from '@angular/platform-browser/animations';

import { routes } from './app.routes';

export const appConfig: ApplicationConfig = {
providers: [
provideBrowserGlobalErrorListeners(),
provideZoneChangeDetection({ eventCoalescing: true }),
provideRouter(routes),
provideAnimations()
]
};
44 changes: 44 additions & 0 deletions projects/igniteui-angular-performance/src/app/app.routes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { Routes } from '@angular/router';
import { GridComponent } from './grid/grid.component';
import { TreeGridComponent } from './tree-grid/tree-grid.component';

export const routes: Routes = [
{
path: "tree-grid-1m",
title: "Tree Grid 1M records",
component: TreeGridComponent,
data: { rows: 1_000_000 }
},
{
path: "tree-grid-100k",
title: "Tree Grid 100k records",
component: TreeGridComponent,
data: { rows: 100_000 }
},
{
path: "tree-grid",
title: "Tree Grid 1k records",
component: TreeGridComponent,
data: { rows: 1000 }
},
{
path: "grid-1m",
title: "Grid 1M records",
component: GridComponent,
data: { rows: 1_000_000 }
},
{
path: "grid-100k",
title: "Grid 100k records",
component: GridComponent,
data: { rows: 100_000 }
},
{
path: "",
title: "Grid 1k records",
pathMatch: 'full',
component: GridComponent,
data: { rows: 1000 }
}

];
Loading
Loading