next card takes 3 seconds | SOLVED

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
Johan_VH
Posts: 67
Joined: Fri Mar 28, 2014 2:46 pm

next card takes 3 seconds | SOLVED

Post by Johan_VH » Thu Jul 31, 2014 1:30 pm

Hi all,

I have a problem... When I go to my next card, it takes up to 3 seconds before it is displayed. Even when I disable all scripts, it still takes that long.
I then made sure every graphic is externally linked and not preloaded in memory, but the lag remains. I develop for desktop by the way.

Is there any way to speed things up? All the graphic elements that are shown on the card are not even 190Kb, and some of them are initially hidden. They are all png's with alpha, but not semi-transparant or anything fancy.

thanks,

Johan
Last edited by Johan_VH on Fri Aug 01, 2014 3:33 pm, edited 1 time in total.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10333
Joined: Wed May 06, 2009 2:28 pm

Re: next card takes 3 seconds

Post by dunbarx » Thu Jul 31, 2014 1:41 pm

Hi.

Well, something is certainly wrong, since card navigation should be instantaneous.

Please post the stack.

Craig Newman

William Jamieson
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 212
Joined: Fri Feb 01, 2013 1:31 am
Contact:

Re: next card takes 3 seconds

Post by William Jamieson » Thu Jul 31, 2014 8:00 pm

Have you tried just starting over and copy pasting all objects and code onto another Card? I am not sure how LC engine works, but something could have gone corrupt with that card specifically. If it is happening to more card than 1 then ignore my advice, for your post sounds like it is just one faulty card.

-Will

Johan_VH
Posts: 67
Joined: Fri Mar 28, 2014 2:46 pm

Re: next card takes 3 seconds

Post by Johan_VH » Fri Aug 01, 2014 10:05 am

I tried William's approach before posting the entire stack, since everything starts with rfid read-in tags, I'd have to reprogram in order to make it work for you guys.
What I noticed is that everything goes smoothly untill I copy my countdown clock. It's a quicktime movie, and apparantely it slows down everything. I rendered it with an animation codec, so I've now tried to render it with different codes but nomatter what the size of the quicktime is (currently 5,9Mb H.264, used to be 12Mb with the animation codec), it just won't speed up. I'm going to try using something else than a quicktime now, and hope it will keep doing what it does (ie. send a message to my code when it stops playing).

I'll keep you posted!

Johan

Johan_VH
Posts: 67
Joined: Fri Mar 28, 2014 2:46 pm

Re: next card takes 3 seconds

Post by Johan_VH » Fri Aug 01, 2014 3:32 pm

I've tried with different codecs for quicktime, hight quality, low quality, to no avail. Even a tiny 5x5 pixel quicktime made sure I had that lag occuring. Preventing it from buffering didn't help either.

I didn't really bother with using something else but quicktime, but decided to just forgo that train of thinking and use jpg's instead. So now I change the filename of the graphic every second, and the lag is completely gone.

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: next card takes 3 seconds | SOLVED

Post by Klaus » Fri Aug 01, 2014 3:38 pm

Dag Johan,

what do you mean with:
What I noticed is that everything goes smoothly untill I copy my countdown clock.
"copy"?

You could try to set the filename of your player to empty "on preopencard" or "closecard" and "on opencard"
set to the correct pathname again and see it that helps.

Is this on Windows?
What version of Livecode are you using?


Best

Klaus

Johan_VH
Posts: 67
Joined: Fri Mar 28, 2014 2:46 pm

Re: next card takes 3 seconds | SOLVED

Post by Johan_VH » Fri Aug 01, 2014 3:48 pm

I was copying each object on my card to a brand new card in order to pinpoint where the problem rose.

It is on windows, I use 6.7 (dp 6).

I just stay on the same card for the entire multiplechoice of 10 questions, and have the clock start and stop by script. I didn't try empty, but I did try to set the filename again with each new start of the clock. As it turns out, the other problem I was having (http://forums.livecode.com/viewtopic.php?f=7&t=21223) was magically solved too once the quicktime was dumped...

Post Reply