Ion-alert-controller's first create() call taking too long to display alert box

I am using ion-alert-controller in my project to display alert boxes.

I am calling create() and present() with await async just as given in doc.

when I fire create(), I see 3 javascript files are being fetched in the network tab.
When I fire present(), 1 javascript is being fetched.

These are fetched only for the very first create() and present() ( i believe these are cached and used for subsequent create and present calls)

On a slow connection, there is a considerable delay between the click of the button and display of the first alert box.

This is breaking my UX. Is there any way to reduce this time or preload those javascripts ?


1 Like