# Multiple loading of data : OnInitializedAsync

**URL:** <https://community.thinkgeo.com/t/multiple-loading-of-data-oninitializedasync/10519>\
**Category:** Blazor\
**Created:** [December 6, 2024, 11:52am UTC](https://community.thinkgeo.com/t/multiple-loading-of-data-oninitializedasync/10519 "2024-12-06T11:52:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ismael](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@Ismael](https://community.thinkgeo.com/u/Ismael)\
**Post date:** [December 6, 2024, 11:52am UTC](https://community.thinkgeo.com/t/multiple-loading-of-data-oninitializedasync/10519/1 "2024-12-06T11:52:41Z")

</div>

Hi,

I’m facing slow loading of my map data. After debugging I found that my code is entering OnInitialized method 3 times which restart the loading of my data 3 times.  
Can you please help me with that?  
Thanks

```
 protected override System.Threading.Tasks.Task OnInitializedAsync()
 {
     osmLayers = new GeoCollection<LayerBase>();
     editingLayers = new GeoCollection<LayerBase>();
     highlightedFeaturesLayers = new GeoCollection<LayerBase>();

     LoadLayers();

     return base.OnInitializedAsync();
 }
```

---

<div class="post-metadata">

**Author:** ![Ben](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ben/32/25720_2.png) [@Ben](https://community.thinkgeo.com/u/Ben)\
**Post date:** [December 6, 2024, 4:00pm UTC](https://community.thinkgeo.com/t/multiple-loading-of-data-oninitializedasync/10519/2 "2024-12-06T16:00:52Z")

</div>

Hi,

I couldn’t recreate the issue, OnInitializedAsync is only hit once on my side. Can you comment out the code in OnInitializedAsync and see if it helps?

```
protected override Task OnInitializedAsync()
{
    return base.OnInitializedAsync();
}

```

If it still has the issue, just keep simplifying the code in your project until it works to debug it.

Thanks,  
Ben
