# Ionic performance or leak of memory

**URL:** <https://forum.ionicframework.com/t/ionic-performance-or-leak-of-memory/93415>\
**Category:** ionic-v3\
**Created:** [June 8, 2017, 7:22am UTC](https://forum.ionicframework.com/t/ionic-performance-or-leak-of-memory/93415 "2017-06-08T07:22:16Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![usiko](https://avatars.discourse-cdn.com/v4/letter/u/e19b73/32.png) [@usiko](https://forum.ionicframework.com/u/usiko)\
**Post date:** [June 8, 2017, 7:22am UTC](https://forum.ionicframework.com/t/ionic-performance-or-leak-of-memory/93415/1 "2017-06-08T07:22:16Z")

</div>

Hi, i’m making an app on ionic2, it work nice and smooth on android phone and ios phone, but it freeze a little on android tablet and it lag much on ipad…

What are ways to debug ionic performance? How can i track the possible leak of memory in my code? There are tutoriels for this?

Thanks

---

<div class="post-metadata">

**Author:** ![reedrichards](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@reedrichards](https://forum.ionicframework.com/u/reedrichards)\
**Post date:** [June 8, 2017, 7:51am UTC](https://forum.ionicframework.com/t/ionic-performance-or-leak-of-memory/93415/2 "2017-06-08T07:51:38Z")

</div>

Do you include the [https://github.com/driftyco/cordova-plugin-wkwebview-engine.git](https://github.com/driftyco/cordova-plugin-wkwebview-engine.git) plugin for iOS in your app?

---

<div class="post-metadata">

**Author:** ![usiko](https://avatars.discourse-cdn.com/v4/letter/u/e19b73/32.png) [@usiko](https://forum.ionicframework.com/u/usiko)\
**Post date:** [June 8, 2017, 7:55am UTC](https://forum.ionicframework.com/t/ionic-performance-or-leak-of-memory/93415/3 "2017-06-08T07:55:55Z")

</div>

This is not unstable with ionic? Anyway i think i have a leak of memory in my code but i dont know how really track it…

---

<div class="post-metadata">

**Author:** ![reedrichards](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@reedrichards](https://forum.ionicframework.com/u/reedrichards)\
**Post date:** [June 8, 2017, 8:13am UTC](https://forum.ionicframework.com/t/ionic-performance-or-leak-of-memory/93415/4 "2017-06-08T08:13:37Z")

</div>

I don’t think it’s unstable or I hope not, I use it in production/in store 😉

Actually that plugin, if I understand correctly, gonna be soon shipped per default with the creation of new Ionic projects.

It really improve the performance on iOS, before spending hours, I advice you to give a try first, but only my point of view of course

---

<div class="post-metadata">

**Author:** ![usiko](https://avatars.discourse-cdn.com/v4/letter/u/e19b73/32.png) [@usiko](https://forum.ionicframework.com/u/usiko)\
**Post date:** [June 8, 2017, 9:11am UTC](https://forum.ionicframework.com/t/ionic-performance-or-leak-of-memory/93415/5 "2017-06-08T09:11:34Z")

</div>

How did you solve CORS problem? how did you set your config.xml?

---

<div class="post-metadata">

**Author:** ![reedrichards](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@reedrichards](https://forum.ionicframework.com/u/reedrichards)\
**Post date:** [June 8, 2017, 9:32am UTC](https://forum.ionicframework.com/t/ionic-performance-or-leak-of-memory/93415/6 "2017-06-08T09:32:01Z")

</div>

Had to allow localhost in my backend

```
 res.setHeader('Access-Control-Allow-Origin', 'http://localhost:8080);

```

Reference: [https://github.com/ionic-team/cordova-plugin-wkwebview-engine/issues/111](https://github.com/ionic-team/cordova-plugin-wkwebview-engine/issues/111)

And if you have to access file on the device, just remove the ‘file://’ in the url of the file

```
file:///var/mobile/Containers/Dat... => /var/mobile/Containers/Dat...

```

Reference: [https://github.com/driftyco/cordova-plugin-wkwebview-engine/issues/80](https://github.com/driftyco/cordova-plugin-wkwebview-engine/issues/80)

---

<div class="post-metadata">

**Author:** ![usiko](https://avatars.discourse-cdn.com/v4/letter/u/e19b73/32.png) [@usiko](https://forum.ionicframework.com/u/usiko)\
**Post date:** [June 8, 2017, 3:45pm UTC](https://forum.ionicframework.com/t/ionic-performance-or-leak-of-memory/93415/7 "2017-06-08T15:45:25Z")

</div>

That not really help, on ipad i get some weird errors en lags…

---

<div class="post-metadata">

**Author:** ![reedrichards](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@reedrichards](https://forum.ionicframework.com/u/reedrichards)\
**Post date:** [June 8, 2017, 3:51pm UTC](https://forum.ionicframework.com/t/ionic-performance-or-leak-of-memory/93415/8 "2017-06-08T15:51:01Z")

</div>

☹

Strange, for me it really improved the overall user experience, my app is simply more smooth with WkWebView.

Don’t have any other ideas, sorry.

---

<div class="post-metadata">

**Author:** ![usiko](https://avatars.discourse-cdn.com/v4/letter/u/e19b73/32.png) [@usiko](https://forum.ionicframework.com/u/usiko)\
**Post date:** [June 9, 2017, 6:57am UTC](https://forum.ionicframework.com/t/ionic-performance-or-leak-of-memory/93415/9 "2017-06-09T06:57:51Z")

</div>

it’s seem useless to set Access-Control-Allow-Origin to [http://localhost:8080](http://localhost:8080) if you use cordova Http natif

---

<div class="post-metadata">

**Author:** ![reedrichards](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@reedrichards](https://forum.ionicframework.com/u/reedrichards)\
**Post date:** [June 9, 2017, 7:00am UTC](https://forum.ionicframework.com/t/ionic-performance-or-leak-of-memory/93415/10 "2017-06-09T07:00:44Z")

</div>

I don’t use cordova Http natif, that’s maybe the difference

---

<div class="post-metadata">

**Author:** ![usiko](https://avatars.discourse-cdn.com/v4/letter/u/e19b73/32.png) [@usiko](https://forum.ionicframework.com/u/usiko)\
**Post date:** [June 12, 2017, 7:48am UTC](https://forum.ionicframework.com/t/ionic-performance-or-leak-of-memory/93415/11 "2017-06-12T07:48:01Z")

</div>

Or maybe it’s because my ipad has 512 MB ram and my app is a bit heavy ^^
