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

Performance slows with larger data sets #131

Open
jerodfritz opened this issue Mar 27, 2018 · 0 comments
Open

Performance slows with larger data sets #131

jerodfritz opened this issue Mar 27, 2018 · 0 comments

Comments

@jerodfritz
Copy link

I've noticed that with multiple instances each with a high number of options say 100+ this library will bring load times to a crawl. For example a page containing 500 rows each with an inline select with 500 options will nearly crash Chrome. Bringing this down to 50 rows will cause the render time to be 20+ seconds. Is there a way we can possibly add some optimizations to this so that it will work with larger data sets?

For example here https://plnkr.co/edit/PaXz9NnN7NzE0h6hnIaX?p=preview:

import {NgModule, Component} from '@angular/core';

@Component({
  selector: 'my-app',
  template: `
    <h1> {{test}} </h1>
    <div *ngFor="let row of rows; let i = index">
        {{i + 1}}
        <inline-editor 
            type="select" 
            [(ngModel)]="rows[i]"
            [options]="options"
            >
        </inline-editor>
    </div>
  `
})
export class AppComponent {
  rows = new Array(50);
  options = [];
  
  constructor(){
    for(var i =0; i < 500; i++){
      this.options.push({text:i,value:i});
    }
  }
}
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

No branches or pull requests

1 participant