Reply to Re: Jeckyl Gets Curb Stomped By Dat Mean 'Ol Mad Hatter

Your name:

Reply:


Posted by Jeckyl on 01/24/07 13:24

> Not really, there are a whole variety of code limitations, at least in
> SwishMax as far as like how many functions you can have per
> sprite/scene.

Yeup .. flash player has limits for number of actions executed, so that it
doesn't get bogged down in potentially infinite loops etc.

> That's why I had to break it apart into 11 different
> sprites. It also has to be broken up on the frame level (which is
> most likely adversely affecting the speed) in order to get the save
> progress meter to work. If there is some other way of doing I've
> never seen it. I did a LOT of experimentation on it though and what I
> got is the best I was able to find. Most of the other methods I tried
> resulted in time outs, browser lockups and browser crashes.

I thought that might be what it was, as you had the same code in multiple
frames.

In that case, you may get better speed by simply increasing the movie frame
rate.

Also, you might look at using setInterval to do your processing, then you
can call your code faster than the frame rate.

> What's slowing it down though isn't the calculation (really my method
> doesn't really have any calculation so much), it's the IF statements,
> which run so damn slow. CASE statements process a lot faster (as far
> as I know)

When compiled, a case is the same as an if (for SWF files) .. unlike
compiling 'C' etc to assembly/machine langauge where case statements can be
turned into jump tables etc. There is only a slight benefit from it only
having to calcaulte the expression you're 'switch'ing on once .. but a
switch/case won't be any faster than the old code that used a single if (it
may indeed be slower) .. but it should work better :)

> which is why it should have a significant impact on the
> overall speed...but that's provided that the speed limitations aren't
> a result of the frame level processing. I might try increasing the
> frame rate of the SWF file and see what effect it has.

Aha .. what I'd just suggested above too :)
--
Jeckyl

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация