# Ionic - Understanding Lazy Loading

**URL:** <https://forum.ionicframework.com/t/ionic-understanding-lazy-loading/141628>\
**Category:** ionic-v3\
**Created:** [September 13, 2018, 11:15am UTC](https://forum.ionicframework.com/t/ionic-understanding-lazy-loading/141628 "2018-09-13T11:15:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![karvanj](https://avatars.discourse-cdn.com/v4/letter/k/da6949/32.png) [@karvanj](https://forum.ionicframework.com/u/karvanj)\
**Post date:** [September 13, 2018, 11:15am UTC](https://forum.ionicframework.com/t/ionic-understanding-lazy-loading/141628/1 "2018-09-13T11:15:51Z")

</div>

Working with ionic 3 I am finally implementing lazy loading into my apps. I have a theoretical question on performance which applies to both Ionic 3/4.

Hypothetically say I have 3 pages:

**Page1**

**Page2**

**Page3**

all of which are lazy loaded.

In addition say I have a modal page called:

**ModalPage**

This modal page is size 1.5mb.

Assume ModalPage is used in Page 1 and Page 2 and included in the respective module.ts for each page (not in app.module).

My question is:

1. When I load the app and I open page1 first and then push page 2 onto the stack. As ModalPage is not global and imported separately for page 1 and page 2. Does this mean my app when I open page1 will lazy-load & download the 1.5mb Modal Page and then again another instance of modal page @ 1.5mb when I push page 2 onto the stack? So in total I am downloading 3mb worth of code?

2. If above is true apart from downloading issues is there any other impact on performance? ie having multiple instances of components/pages loaded via page modules instead of globally importing the component/pages once into the app.module

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:17pm UTC](https://forum.ionicframework.com/t/ionic-understanding-lazy-loading/141628/2 "2021-07-19T21:17:32Z")

</div>

Closed on July 19, 2021, 9:17pm UTC


