# Multi-page app load speed

**URL:** <https://community.plotly.com/t/multi-page-app-load-speed/67977>\
**Category:** Dash Python\
**Tags:** question\
**Created:** [September 15, 2022, 1:47pm UTC](https://community.plotly.com/t/multi-page-app-load-speed/67977 "2022-09-15T13:47:19Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![anarchocaps](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@anarchocaps](https://community.plotly.com/u/anarchocaps)\
**Post date:** [September 15, 2022, 1:47pm UTC](https://community.plotly.com/t/multi-page-app-load-speed/67977/1 "2022-09-15T13:47:19Z")

</div>

I have a multi page app that I am finding has a slow initial page load speed.

My question - when the app is first visited, do all the callbacks from all the pages trigger, or is it just the callbacks from the currently active page that triggers? If they all trigger, is there a way to disable this?

There are 10 pages, all of which are pulling data from an AWS RDS db, and uploading it to a datatable component and a chart.

thank you

---

<div class="post-metadata">

**Author:** ![F2P](https://avatars.discourse-cdn.com/v4/letter/f/9d8465/32.png) [@F2P](https://community.plotly.com/u/F2P)\
**Post date:** [September 15, 2022, 2:22pm UTC](https://community.plotly.com/t/multi-page-app-load-speed/67977/2 "2022-09-15T14:22:20Z")

</div>

In my experience it is only the active pages that are loaded. You could easily check this yourself with a print statement when the callback is triggered.

---

<div class="post-metadata">

**Author:** ![AnnMarieW](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@AnnMarieW](https://community.plotly.com/u/AnnMarieW)\
**Post date:** [September 15, 2022, 3:29pm UTC](https://community.plotly.com/t/multi-page-app-load-speed/67977/3 "2022-09-15T15:29:06Z")

</div>

Hi @anarchocaps

You can speed the load time if you also set `suppress_callback_exceptions=True`

```auto
app = Dash( __name__ , use_pages=True, suppress_callback_exceptions=True)

```

If you exclude this, `pages` will automatically create a `app.validation_layout` for you under the hood, which can slow the load time. (More info [here](https://dash.plotly.com/urls#dynamically-create-a-layout-for-multi-page-app-validation))

Note that if your page layouts are functions, it may still be slow, however this will be fixed in the next release (2.6.2) coming soon.

---

<div class="post-metadata">

**Author:** ![anarchocaps](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@anarchocaps](https://community.plotly.com/u/anarchocaps)\
**Post date:** [September 16, 2022, 12:12am UTC](https://community.plotly.com/t/multi-page-app-load-speed/67977/4 "2022-09-16T00:12:52Z")

</div>

Thanks @AnnMarieW .

My layouts are currently functions in other modules, that I am importing into the module with the callbacks.

When the update arrives, will the update make using layout as a function the same speed as using app.layout directly, or will there still be a difference between the two of them?

thank you

---

<div class="post-metadata">

**Author:** ![lex1](https://avatars.discourse-cdn.com/v4/letter/l/b3f665/32.png) [@lex1](https://community.plotly.com/u/lex1)\
**Post date:** [August 23, 2024, 11:40am UTC](https://community.plotly.com/t/multi-page-app-load-speed/67977/5 "2024-08-23T11:40:24Z")

</div>

Hi @AnnMarieW I’m wondering if the functional layouts was fixed? Couldn’t see anything in the changelog. I am seeing 2 seconds minimum for a layout function to run even with just one html.Div() and suppress\_callback\_exceptions=True. Running layout functions without dash\_pages happens in millisecs. Can do a MRE if needed.

---

<div class="post-metadata">

**Author:** ![AnnMarieW](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@AnnMarieW](https://community.plotly.com/u/AnnMarieW)\
**Post date:** [August 23, 2024, 3:46pm UTC](https://community.plotly.com/t/multi-page-app-load-speed/67977/6 "2024-08-23T15:46:50Z")

</div>

Hi @lex1

Yes, this was fixed in [2.6.2](https://github.com/plotly/dash/blob/dev/CHANGELOG.md#262---2022-09-23) but maybe now there is something else now that’s slowing things down? MRE is always helpful. Thanks.

---

<div class="post-metadata">

**Author:** ![lex1](https://avatars.discourse-cdn.com/v4/letter/l/b3f665/32.png) [@lex1](https://community.plotly.com/u/lex1)\
**Post date:** [August 24, 2024, 10:10am UTC](https://community.plotly.com/t/multi-page-app-load-speed/67977/7 "2024-08-24T10:10:09Z")

</div>

Sorry was all on my end, just needed to reboot the dashapp to update the function!

---

<div class="post-metadata">

**Author:** ![BridgerAlec](https://avatars.discourse-cdn.com/v4/letter/b/22d042/32.png) [@BridgerAlec](https://community.plotly.com/u/BridgerAlec)\
**Post date:** [September 30, 2024, 12:30pm UTC](https://community.plotly.com/t/multi-page-app-load-speed/67977/8 "2024-09-30T12:30:27Z")

</div>

> [@anarchocaps](#):
>
> I have a multi page app that I am finding has a slow initial page load speed.
> 
> My question - when the app is first visited, do all the callbacks from all the pages trigger, or is it just the callbacks from the currently active [page](https://insignia.com.pk/collections/sandal) that triggers? If they all trigger, is there a way to disable this?
> 
> There are 10 pages, all of which are pulling data from an AWS RDS db, and uploading it to a datatable component and a chart.

My question is regarding how the callbacks function when the app is first visited. Specifically, do all the callbacks from all pages trigger immediately, or is it just the callbacks from the currently active page that execute? I suspect that if all callbacks are firing upon the initial visit, it could be contributing to the slow load time.
