# Ionic2 searchbar very slow for 1000+ items

**URL:** <https://forum.ionicframework.com/t/ionic2-searchbar-very-slow-for-1000-items/47491>\
**Category:** ionic-v3\
**Created:** [March 26, 2016, 6:03am UTC](https://forum.ionicframework.com/t/ionic2-searchbar-very-slow-for-1000-items/47491 "2016-03-26T06:03:09Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Jorchg](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@Jorchg](https://forum.ionicframework.com/u/Jorchg)\
**Post date:** [March 28, 2016, 1:37pm UTC](https://forum.ionicframework.com/t/ionic2-searchbar-very-slow-for-1000-items/47491/5 "2016-03-28T13:37:53Z")

</div>

Hi!!

I just binded a simple Pipe to an input, like this:

My Input:  
`<ion-input clearInput type="text" placeholder="Search..." [(ngModel)]="searchQuery"></ion-input>`

My ngFor with the pipe:  
`<button ion-item *ngFor="#contact of contacts | ContactsPipe:searchQuery" class="crazy" ion-chevron-right (click)="goToNewChat(contact)">`

My pipe, very simple:

import {Pipe} from ‘angular2/core’;

```
@Pipe({
  name: 'ContactsPipe'
})
export class ContactsPipe {
  transform(values, args?) {
    let [name] = args;
    if (name === '') return values;
    return values.filter(contact => {
      if (contact.name.formatted.toLowerCase().search(name.toLowerCase()) > -1) {
        return contact;
      }
    })
  }
}

```

Hope it helps 🙂

---

_[View the full topic](https://forum.ionicframework.com/t/ionic2-searchbar-very-slow-for-1000-items/47491)._
