# Android performance issue with ng-repeat and filter

**URL:** <https://forum.ionicframework.com/t/android-performance-issue-with-ng-repeat-and-filter/17995>\
**Category:** uncategorized\
**Created:** [February 21, 2015, 3:03am UTC](https://forum.ionicframework.com/t/android-performance-issue-with-ng-repeat-and-filter/17995 "2015-02-21T03:03:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![petko](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@petko](https://forum.ionicframework.com/u/petko)\
**Post date:** [February 21, 2015, 3:03am UTC](https://forum.ionicframework.com/t/android-performance-issue-with-ng-repeat-and-filter/17995/1 "2015-02-21T03:03:16Z")

</div>

hi,  
i have the following code which is very sluggish on android (4.4.2).

```
          <ion-header-bar class="bar bar-header item-input-inset">
          <i class="icon ion-search placeholder-icon"></i>
          <input type="text" placeholder="Search.." ng-model="search.name" class="form-control" >
          <button ng-if="search.name.length"
                class="button button-clear icon ion-close-circled"
                ng-click="search.name=''">
        </button>
    </ion-header-bar>

    <ion-list>
        <ion-item ng-repeat="friend in filered = (friends | filter: {name:search.name})" type="item-text-wrap">
            <div class="row">

```

I have seen people here suggest that ng-repeat has performance issues. The number of element in the list is about 100. Almost never more than that. Is there anything easy I can do to improve performance ?  
thanks!

---

<div class="post-metadata">

**Author:** ![joseadrian](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/joseadrian/32/71106_2.png) [@joseadrian](https://forum.ionicframework.com/u/joseadrian)\
**Post date:** [February 21, 2015, 3:06am UTC](https://forum.ionicframework.com/t/android-performance-issue-with-ng-repeat-and-filter/17995/2 "2015-02-21T03:06:30Z")

</div>

Try [Collection repeat](http://ionicframework.com/docs/api/directive/collectionRepeat/).  
You will see in the example they have 1000 items on a list and the performance is good.

---

<div class="post-metadata">

**Author:** ![petko](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@petko](https://forum.ionicframework.com/u/petko)\
**Post date:** [February 21, 2015, 3:07am UTC](https://forum.ionicframework.com/t/android-performance-issue-with-ng-repeat-and-filter/17995/3 "2015-02-21T03:07:36Z")

</div>

does filtering work similarly?

---

<div class="post-metadata">

**Author:** ![petko](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@petko](https://forum.ionicframework.com/u/petko)\
**Post date:** [February 21, 2015, 3:12am UTC](https://forum.ionicframework.com/t/android-performance-issue-with-ng-repeat-and-filter/17995/4 "2015-02-21T03:12:58Z")

</div>

seem like it. they even have it in the example. let me give it a shot - thanks!

---

<div class="post-metadata">

**Author:** ![petko](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@petko](https://forum.ionicframework.com/u/petko)\
**Post date:** [February 21, 2015, 3:49am UTC](https://forum.ionicframework.com/t/android-performance-issue-with-ng-repeat-and-filter/17995/5 "2015-02-21T03:49:59Z")

</div>

thanks. performance issues solved!  
now if i can only figure out why the icon does not show in android 4.4.2 :

```
            <button ng-if="search.name.length"
            class="button button-clear icon ion-close-circled"
            ng-click="search.name=''">

```

that would be awesome!
