开发者

Disabling script max-execution-time in flex?

开发者 https://www.devze.com 2022-12-26 01:40 出处:网络
How do I completely di开发者_开发技巧sable the max-execution-time for scripts in flex? The configurable max is 60 seconds, but I\'m calling off to other interactive processes which will probably run m

How do I completely di开发者_开发技巧sable the max-execution-time for scripts in flex? The configurable max is 60 seconds, but I'm calling off to other interactive processes which will probably run much longer than that. Is there an easy way to disable the maximum script execution time across my entire application?


you can't. and probably, that's quite good. of course it's a pitty that you can't but when looking at the kind of things some people fabricate with the flash player, I am very happy.

For simplicity Adobe decided to promote a single threaded execution model that allows concurrent operations through asynchronous callbacks. sometimes this becomes anoying, verbous and even slower (performing a big calculation in a green thread simply takes longer than doing it directly). It's more of a political choice, so I guess the best you can do is live with it.

or you could explain what exactly you're up to, so I could propose a solution.

p.s.: there has been quite a lot of discussion going on about threads for background calculation. also, some people use seperate SWFs to perform calculation, or push it to pixel bender. also, you may wanna have a look at alchemy. it supports threading through relatively efficient continuation passing.


I have a long-running SOAP request that times-out with Error 1502. "Error #1502: A script has executed for longer than the default timeout period of 15 seconds."

I went to the right-click Properties dialog on the project in Flash Builder 4, then the Flex Compiler Options.

I set the Flex Compiler Options to "-locale en_US -default-script-limits 1000 60".

The locale was already there. It was the -default-script-limits that was cryptic to decipher from the compiler reference.

But I still got the fault with Error 1502 and 15 seconds. I even did a Project->Clean... command and tried again.

So, where is that 15 second timeout set? It turns out -- from some Googling and I'm not entirely sure -- that the Flex compiler accepts my setting, but the timeout message is fixed text with the 15 seconds message.

I also found that I could try: -default-script-limits 1000 65535. That didn't help either. This is from a posting on FlashDevelop.org 1

The bottom line for me is that I now need to page or otherwise divide up the information I am requesting in the SOAP call. My code still works fine for small requests.

0

精彩评论

暂无评论...
验证码 换一张
取 消