Card Loading Very Slowly

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Gage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 224
Joined: Tue Mar 26, 2013 8:59 pm

Card Loading Very Slowly

Post by Gage » Tue Jul 01, 2014 9:28 pm

Hello,

I am noticing that when I deploy my app for testing, there is a card that loads VERY slowly (takes 4-5 seconds).

I am hoping to load it in much less time, so I wanted to see if anyone had a clue about why it may be going so slowly.

This card is essentially a View Profile page (including a few images at the top, as well as a bunch of fields displaying text and statistics). There is a DG Table on the card as well, which is initially set to invisible. It only displays when the Profile Image is clicked.

This Datagrid seems to be pretty simple: there are about 120 rows, each including an 80x80 button (with icon set to a given image) and a label. This means there are roughly 120 images stored on the Row Template, which the buttons have their icons set to as they are rendered.

So... that's all that is on the card at this point, and it's taking a long time to:
A) Load the card when going to it from another card
B) Make the DG visible AFTER the user is already on the card

I was hoping someone could shed some light on this for me... I don't think 120 80x80 images on the Row Template card should be taking this long to load during runtime, though I may be way wrong, or have incorrect assumptions.

I can provide any more information if it is needed, but it seems like it just takes a long time to process, and I am looking for a way around that!

Thanks in advance!
Phil E.

keram
Posts: 340
Joined: Fri Nov 08, 2013 4:22 am

Re: Card Loading Very Slowly

Post by keram » Wed Jul 02, 2014 11:17 am

Hi Phil,

I have similar issue to solve - see my post:
http://forums.livecode.com/viewtopic.ph ... 0b#p102877

So far the only thing that helped to speed up opening the cards with just few text fields was to reduce the amount of data in the fields. The card with the DG in my app is also loading very slowly, and it's scrolling very slowly as well when using the native android scroller.

I've got some response from one of the DG experts and he said that: "The scrolling problem is more relative on how the datagrid engine is
dispatching data to each row in the datagrid." It may be the same reason why in your case the DG loads slowly.

I'm not sure what would be best solution but now I'm working on adapting another way of using the DG which is described in this lesson:
http://lessons.runrev.com/m/datagrid/l/ ... ts-of-data
maybe it will help.

I'll post the result if I notice any improvements in loading the DG and scrolling speed.

If you find any other solution it will be great to know it as well.

Good luck.

keram
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit

Gage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 224
Joined: Tue Mar 26, 2013 8:59 pm

Re: Card Loading Very Slowly

Post by Gage » Thu Jul 03, 2014 9:02 pm

Thanks for your reply, keram!

I really don't have anything at all in the fields, and the DG itself contains 120 smallish images. Seems not to be that much for the delays I am experiencing, but I'll follow your recommendations and post if I make any headway.

Thanks again for your help!

Phil E.

keram
Posts: 340
Joined: Fri Nov 08, 2013 4:22 am

Re: Card Loading Very Slowly

Post by keram » Fri Jul 04, 2014 1:57 am

Gage wrote:I am noticing that when I deploy my app for testing
Are you testing on the emulator or real device?

Is the DG having 'fixed control height' selected (=true) in the properties?

keram
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit

keram
Posts: 340
Joined: Fri Nov 08, 2013 4:22 am

Re: Card Loading Very Slowly

Post by keram » Fri Jul 04, 2014 2:46 am

Another thought...
Could this http://forums.livecode.com/viewtopic.php?f=53&t=19993 be the reason?
keram
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit

Gage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 224
Joined: Tue Mar 26, 2013 8:59 pm

Re: Card Loading Very Slowly

Post by Gage » Sun Jul 06, 2014 2:28 am

I am testing it on my personal Android at the moment. Going to take a look at the other post you linked.

The fixed control height is set to true (and also disabled, so I couldn't change that if I wanted to, it seems).

Thanks,
P

Gage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 224
Joined: Tue Mar 26, 2013 8:59 pm

Re: Card Loading Very Slowly

Post by Gage » Thu Jul 10, 2014 11:37 pm

After removing the line in the PreOpenStack script that sets the accelratedRendering to true, I noticed no change. Still not sure what the cause is here.

Phil

keram
Posts: 340
Joined: Fri Nov 08, 2013 4:22 am

Re: Card Loading Very Slowly

Post by keram » Fri Jul 11, 2014 1:49 am

Hi Phil,

Which LC version are you using?

If you want I can test it on my tablet. Just upload the stack and all the necessary files to some file sharing account (e.g. Dropbox) since it may be too big to post it here as an attachment, and I'll create the android standalone and test it for you.

keram
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit

Post Reply