Page 1 of 1

next card takes 3 seconds | SOLVED

Posted: Thu Jul 31, 2014 1:30 pm
by Johan_VH
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

Re: next card takes 3 seconds

Posted: Thu Jul 31, 2014 1:41 pm
by dunbarx
Hi.

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

Please post the stack.

Craig Newman

Re: next card takes 3 seconds

Posted: Thu Jul 31, 2014 8:00 pm
by William Jamieson
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

Re: next card takes 3 seconds

Posted: Fri Aug 01, 2014 10:05 am
by Johan_VH
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

Re: next card takes 3 seconds

Posted: Fri Aug 01, 2014 3:32 pm
by Johan_VH
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.

Re: next card takes 3 seconds | SOLVED

Posted: Fri Aug 01, 2014 3:38 pm
by Klaus
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

Re: next card takes 3 seconds | SOLVED

Posted: Fri Aug 01, 2014 3:48 pm
by Johan_VH
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...