PDA

View Full Version : Overriding maximum recursion depth and ActionScript timeout.


mbh
07-19-2004, 01:29 PM
The Flash 7 File Format Specification (http://download.macromedia.com/pub/flash/flash_file_format_specification.pdf) defines a ScriptLimits tag which "can be used to override the default settings for maximum recursion depth and ActionScript time-out."

Can the Laszlo compiler include this tag in the swf output file, with values I provide for the recursion limit and timeout?

Thanks,
Brent

antun
07-19-2004, 01:32 PM
Hi Brent

If it's a matter of adding something to the <object>/<embed> tags, then you can write your own wrapper page to embed the Laszlo app inside and add those tags.

-Antun

mbh
07-19-2004, 01:56 PM
Hi Antun,

The OBJECT and EMBED tags don't appear
(http://www.macromedia.com/support/flash/ts/documents/tag_attributes.htm) to have attributes that control the maximum recursion depth and ActionScript time-out.

From the format specification, it sounds like the ScriptLimits header must be included right in the SWF bytecode.

Thanks,
Brent

antun
07-19-2004, 02:03 PM
Oh I see what you mean - that would be a Flash 7-specific feature, and Laszlo doesn't currently support features specific to newer Flash players, since it's the Flash 5 player that has the ubiquitous install base.

Are you having performanc problems in your application?

-Antun

mbh
07-20-2004, 05:35 AM
Yes, we are having some performance problems.

The biggest concern right now is a "your computer may become unresponsive" message during initialization of the application. We have tried delaying initialization of parts of the app (using initstage='late'), but this caused long delays when accessing certain parts of the UI for the first time. We would prefer to have all initialization happen up front, so the entire application appears responsive.

I might be able to get away with late initialization if there was some way to notify the user that (late) initialization was taking place. Is there any way to know when the Instantiator is running? The only events it exposes are onkeyup/down.

Or, alternatively, knowing that our Laszlo code takes a long time to initialize, is there anything you can recommend besides late initialization to speed things up?

Thanks,
Brent

antun
07-20-2004, 09:24 AM
Hi Brent

The biggest concern right now is a "your computer may become unresponsive" message during initialization of the application.

Usually this is the result of a lot of views instantiating and maybe very complicated constraints. Is there any way of reducing the number of views in your application? Are there replicated elements or often-used classes that are made of many subviews that can be lightened at all?

I might be able to get away with late initialization if there was some way to notify the user that (late) initialization was taking place. Is there any way to know when the Instantiator is running?

If you're going to defer instantiation, then you need to issue the call for whatever section of the app you want to finish instantiating; ergo you know when the instantiation begins. You could give some kind of "please wait" indicator to the user at this point. When a view finishes instantiating it sends the oninit event, so you can use this event to catch the end of the deferred instanatiation, and hide the please wait indicator.

-Antun

ptw
07-20-2004, 09:48 AM
Hey Brent,

It was my understanding from reading the MM info that they did not recommend increasing either of these limits, that they only provided these controls to help in measuring/debugging. We don't currently support setting these from LZX.

You should note that the Flash 7 player is significantly faster than 6 or 5, and less likely to give you the 'running slowly' warning. Similarly, the PC player is faster than the Mac player. Of course, this is not a solution if you can't say what player you will deploy to.

Finallly, have you tried KRANK-ing your app? The KRANK process eliminates most of the start-up overhead from the resulting app. Personally, I would try kranking my app before I spent a lot of time playing with initstage settings.