RE: A script has executed for longer than ....

2015-06-26 Thread Frédéric THOMAS
: A script has executed for longer than To: users@flex.apache.org Cannot download EasyWorker. File not found. On Fri, Jun 26, 2015 at 4:04 AM mark goldin markzolo...@gmail.com wrote: Ok, I got it running but it still timing out. Here is some code: public function result(data:Object):void

RE: A script has executed for longer than ....

2015-06-26 Thread Frédéric THOMAS
From: aha...@adobe.com To: users@flex.apache.org Subject: Re: A script has executed for longer than Date: Thu, 25 Jun 2015 20:38:59 + In Flex 3, mx.core.Application.application from anywhere should give you access to the Application and thus its stage

Re: A script has executed for longer than ....

2015-06-26 Thread Alex Harui
On 6/26/15, 8:39 AM, mark goldin markzolo...@gmail.com wrote: It's getting called just once. Well, then that would be the problem. PseudoThread can’t magically get the player to spin threads. It just automates calling a callback function over and over again to do the total work in

Re: A script has executed for longer than ....

2015-06-26 Thread mark goldin
It's getting called just once. On Fri, Jun 26, 2015 at 10:33 AM Alex Harui aha...@adobe.com wrote: What work is done in processXML? Step through it and make sure you are done quickly and it gets called many times. On 6/26/15, 2:04 AM, mark goldin markzolo...@gmail.com wrote: Ok, I got it

Re: A script has executed for longer than ....

2015-06-26 Thread mark goldin
I am trying to implement workers. I am not sure how I tell a worker what to do. On Fri, Jun 26, 2015 at 8:24 AM mark goldin markzolo...@gmail.com wrote: Cannot download EasyWorker. File not found. On Fri, Jun 26, 2015 at 4:04 AM mark goldin markzolo...@gmail.com wrote: Ok, I got it running

Re: A script has executed for longer than ....

2015-06-26 Thread Alex Harui
What work is done in processXML? Step through it and make sure you are done quickly and it gets called many times. On 6/26/15, 2:04 AM, mark goldin markzolo...@gmail.com wrote: Ok, I got it running but it still timing out. Here is some code: public function result(data:Object):void { var

Re: A script has executed for longer than ....

2015-06-26 Thread mark goldin
Ok, I got it running but it still timing out. Here is some code: public function result(data:Object):void { var re:ResultEvent = ResultEvent(data); thread = new PseudoThread(UIComponent(Application.application).systemManager, processXML, re.result.resultData); } private function

Re: A script has executed for longer than ....

2015-06-26 Thread mark goldin
Cannot download EasyWorker. File not found. On Fri, Jun 26, 2015 at 4:04 AM mark goldin markzolo...@gmail.com wrote: Ok, I got it running but it still timing out. Here is some code: public function result(data:Object):void { var re:ResultEvent = ResultEvent(data); thread = new

Re: A script has executed for longer than ....

2015-06-25 Thread Alex Harui
In Flex 3, mx.core.Application.application from anywhere should give you access to the Application and thus its stage. In Flex 4, use FlexGlobals.topLevelApplication. -Alex On 6/25/15, 10:59 AM, mark goldin markzolo...@gmail.com wrote: Alex, I need to use it from a command class that does not

Re: A script has executed for longer than ....

2015-06-25 Thread Alex Harui
On 6/25/15, 8:17 AM, mark goldin markzolo...@gmail.com wrote: In the threadCompleteHandler function? threadCompleteHandler is called when your callback function returns false. The callback function is a function you pass into PseudoThread. -Alex On Thu, Jun 25, 2015 at 10:03 AM Alex Harui

Re: A script has executed for longer than ....

2015-06-25 Thread Alex Harui
Well, xml is terribly slow. If you can server-side process it into something else (RemoteObject/AMF to ValueObjects is considered to be the fastest, ObjectProxy is also slow, JSON might be fast) then you might be able to process all of the data in 60 seconds in ActionScript. However, if one of

Re: A script has executed for longer than ....

2015-06-25 Thread Alex Harui
That sounds like pseudo-threading. You would have to break it up in one frame, handle chunks in separate frames, and assemble in the last frame. With pseudo-threading, you don’t have to break it up and lose parenting and re-assemble, you just keep some state around, and process chunks in each

Re: A script has executed for longer than ....

2015-06-25 Thread mark goldin
What if I break xml into pieces for separate processing and then put them together into one final xml? On Thu, Jun 25, 2015 at 9:12 AM Alex Harui aha...@adobe.com wrote: Well, xml is terribly slow. If you can server-side process it into something else (RemoteObject/AMF to ValueObjects is

RE: A script has executed for longer than ....

2015-06-25 Thread Frédéric THOMAS
:43 + Subject: Re: A script has executed for longer than To: users@flex.apache.org In the threadCompleteHandler function? On Thu, Jun 25, 2015 at 10:03 AM Alex Harui aha...@adobe.com wrote: In the callback function. The callback function would probably process some node and update

Re: A script has executed for longer than ....

2015-06-25 Thread mark goldin
will receive your data. Frédéric THOMAS From: markzolo...@gmail.com Date: Thu, 25 Jun 2015 15:17:43 + Subject: Re: A script has executed for longer than To: users@flex.apache.org In the threadCompleteHandler function? On Thu, Jun 25

Re: A script has executed for longer than ....

2015-06-25 Thread mark goldin
I see. Alex, I am looking into the article you have provided. Just a quick question. Where do I put my code to process xml? Because you code is rendering screen I am not sure how to adapt your code to my needs. On Thu, Jun 25, 2015 at 9:33 AM Alex Harui aha...@adobe.com wrote: That sounds like

Re: A script has executed for longer than ....

2015-06-25 Thread OmPrakash Muppirala
You can also use AS3 Workers. Thanks, Om On Jun 25, 2015 7:46 AM, mark goldin markzolo...@gmail.com wrote: I see. Alex, I am looking into the article you have provided. Just a quick question. Where do I put my code to process xml? Because you code is rendering screen I am not sure how to

RE: A script has executed for longer than ....

2015-06-25 Thread Frédéric THOMAS
From: markzolo...@gmail.com Date: Thu, 25 Jun 2015 15:35:59 + Subject: Re: A script has executed for longer than To: users@flex.apache.org Can I implement workers if I use Flex 3 with 4.13 SDK? On Thu, Jun 25, 2015 at 10:29 AM Frédéric THOMAS webdoubl...@hotmail.com wrote

Re: A script has executed for longer than ....

2015-06-25 Thread mark goldin
In the threadCompleteHandler function? On Thu, Jun 25, 2015 at 10:03 AM Alex Harui aha...@adobe.com wrote: In the callback function. The callback function would probably process some node and update variables so when it gets called again it knows to process a different node. On 6/25/15,

Re: A script has executed for longer than ....

2015-06-25 Thread Alex Harui
In the callback function. The callback function would probably process some node and update variables so when it gets called again it knows to process a different node. On 6/25/15, 7:46 AM, mark goldin markzolo...@gmail.com wrote: I see. Alex, I am looking into the article you have provided.

Re: A script has executed for longer than ....

2015-06-25 Thread Javier Guerrero García
Hi Mark: A long shot here: are you sure that, while you are processing the XML, you're NOT triggering constant UI updates on each operation? For instance: if after processing each XML item, you are adding the final result to an ArrayCollection, and you have some rendering component bound to that

Re: A script has executed for longer than ....

2015-06-25 Thread Javier Guerrero García
More on that: http://www.jamesward.com/2008/11/21/drunk-on-software-episode-3-performance-pitfalls-of-flexs-arraycollection/ On Thu, Jun 25, 2015 at 6:29 PM, Javier Guerrero García javi...@gmail.com wrote: Hi Mark: A long shot here: are you sure that, while you are processing the XML, you're

Re: A script has executed for longer than ....

2015-06-25 Thread mark goldin
Alex, I need to use it from a command class that does not have systemManager or its stages. How do I go about it? On Thu, Jun 25, 2015 at 11:34 AM Javier Guerrero García javi...@gmail.com wrote: More on that: