Software Archive
Read-only legacy content
17061 Discussions

Build very slow on any device.

Rafael_H_
Beginner
510 Views

I have made an app with lots of buttons we are talking maybe 80 buttons that lead to a page that loads an iframe each. The problem I'm having is that it takes about 10 seconds on any newer device for the app to start functioning properly, older or low resource phones won't even load the app goes to a black screen after the 10 seonds on newer devices works fast and good.. During those 10 seconds the app appears to be stuck. So my concern is that people will just close it thinking that it is not functional. Anything I can do to maybe preload or something?

0 Kudos
4 Replies
Swati_S_Intel1
Employee
510 Views

How are you loading the iframes? If you are loading all at the same time, it will take long. I would imagine you would have buttons and every click would launch content into iframe. In that case fetching content is per use basis, which should not take long. So looks like you have issue with initial load time. For that, make sure whatever  assets you are using are small, loading 80 high resolution images will take time. You could use image sprite instead.

Swati

0 Kudos
Rafael_H_
Beginner
510 Views

Hey first of all thanks for responding, ok what I do is the following, I have a main page with 2 buttons, each button takes you to a new page there are 2, each of these 2 pages contain about 30 and 45 buttons. Each of these buttons take you to another page that loads an external Iframe with only text on it, no images but it is a lot of text all of these are saved locally on a different subfolder different html files. I supposed that it is loading everything at once I guess. How can I manage to make it load upon request? or something like that or even just show a loading screen for a few seconds to allow the app to load any suggestions will greatly help. I hope that I'm clear enough if not please let me know. By the way I created everything using the drag and drop tools that XDK offers and Ionic framework.

0 Kudos
Rafael_H_
Beginner
510 Views

Nothing???

0 Kudos
Anusha_M_Intel1
Employee
510 Views

It doesn't look like the iframes are loading everything at once. However, he solution to your problem might be to redesign your app. Use iframes sparingly. iframes are going to be slower because there is an additional overhead for the browser (rendering it, maintaining it's instance and references to it). You can maybe change it with a div and an ajax call. The ajax call is going to be a bit faster because you get the data in and you then inject it, or do whatever you want with it. The iframe will need to build an entirely new "page" in the browsers memory, and then place it in the page.

Here is some reading that might provide a better understanding: http://www.stevesouders.com/blog/2009/06/03/using-iframes-sparingly/

 

0 Kudos
Reply