{"id":56,"date":"2007-11-08T16:14:02","date_gmt":"2007-11-09T00:14:02","guid":{"rendered":"http:\/\/www.antunkarlovac.com\/blog\/?p=56"},"modified":"2007-11-08T16:16:31","modified_gmt":"2007-11-09T00:16:31","slug":"tell-those-pesky-script-running-slowly-errors-where-to-go","status":"publish","type":"post","link":"https:\/\/www.antunkarlovac.com\/blog\/2007\/11\/08\/tell-those-pesky-script-running-slowly-errors-where-to-go\/","title":{"rendered":"Tell Those Pesky Script-Running-Slowly Errors Where to Go"},"content":{"rendered":"<p>Anyone who has done any OpenLaszlo (or Flash-related) development has inevitably come across those dreaded Script-Running-Slowly errors. They&#8217;re caused by the application taking too long to process a piece of script. e.g. An infinite (or very long) loop, creating too many views at once or a large number of chained constraints.<\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"http:\/\/www.antunkarlovac.com\/blog\/wp-content\/uploads\/2007\/11\/nomore.jpg\" alt=\"No more issues.\" \/><\/p>\n<p>Happily, there&#8217;s now a cure. As of Flash 7 (which is the minimum supported Flash runtime in OpenLaszlo 4.0+), the criteria for triggering these errors are configurable. Hopefully this feature will make it into the OpenLaszlo platform, but for now, you can use the Windows<br \/>\nSWF ScriptLimits Injector (SWFSLI) program to tweak these criteria.<\/p>\n<ol>\n<li>Download the SWFSLI program from: <a href=\"http:\/\/www.buraks.com\/swfsli\/\" target=\"_blank\">http:\/\/www.buraks.com\/swfsli\/<\/a><\/li>\n<li>Compile your OpenLaszlo application SOLO using proxied=&#8221;false&#8221; in the canvas.<\/li>\n<li>Run SWFSLI against the newly-compiled SWF:<br \/>\nswfsli myapp.lzx.lzr\\=swf7.swf \/r65535 \/t300 \/b<\/li>\n<\/ol>\n<p>That&#8217;s it. SWFSLI will adjust the settings in your original SWF file, and make a backup copy. To deploy, you&#8217;ll need a wrapper page. Note that this won&#8217;t make your application run faster; it&#8217;ll only loosen Flash&#8217;s criteria for throwing the Script-Running-Slowly error.<\/p>\n<p>I created two examples (before.swf and after.swf). Both of these run 10,000,000 iterations and then print that they&#8217;re done. On my laptop, before.swf consistenly throws the error, after.swf never does:<\/p>\n<ul>\n<li><a href=\"http:\/\/www.antunkarlovac.com\/blog\/wp-content\/uploads\/2007\/11\/before.swf\" title=\"Before\">Before<\/a><\/li>\n<li><a href=\"http:\/\/www.antunkarlovac.com\/blog\/wp-content\/uploads\/2007\/11\/after.swf\" title=\"After\">After<\/a><\/li>\n<\/ul>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Anyone who has done any OpenLaszlo (or Flash-related) development has inevitably come across those dreaded Script-Running-Slowly errors. They&#8217;re caused by the application taking too long to process a piece of script. e.g. An infinite (or very long) loop, creating too many views at once or a large number of chained constraints. Happily, there&#8217;s now a &hellip; <a href=\"https:\/\/www.antunkarlovac.com\/blog\/2007\/11\/08\/tell-those-pesky-script-running-slowly-errors-where-to-go\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Tell Those Pesky Script-Running-Slowly Errors Where to Go<\/span><\/a><!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/www.antunkarlovac.com\/blog\/wp-json\/wp\/v2\/posts\/56"}],"collection":[{"href":"https:\/\/www.antunkarlovac.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.antunkarlovac.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.antunkarlovac.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.antunkarlovac.com\/blog\/wp-json\/wp\/v2\/comments?post=56"}],"version-history":[{"count":0,"href":"https:\/\/www.antunkarlovac.com\/blog\/wp-json\/wp\/v2\/posts\/56\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.antunkarlovac.com\/blog\/wp-json\/wp\/v2\/media?parent=56"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.antunkarlovac.com\/blog\/wp-json\/wp\/v2\/categories?post=56"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.antunkarlovac.com\/blog\/wp-json\/wp\/v2\/tags?post=56"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}