4 Replies Latest reply on Dec 4, 2007 4:28 PM by ntsiii

    how to achive multi-threading kind of behaviour in flex

    FlexIsdabba
      Let’s say I have quite large amount of data to process in background, does it mean, that the GUI of my app will be locked until the processing is finished?

      What can I do to improve GUI performance and responsiveness during background processing?

      How can i achive multi-threading kind of behaviour in flex & is Asynchronous process can help me if yes than please help me on that.

      Thanks
      Sss
        • 1. Re: how to achive multi-threading kind of behaviour in flex
          Sreenivas R Adobe Employee
          The solution I have used is to do data processing piece by pice in a timer callback. When data processing is done dispatch a event which can be used to consume the result.
          • 2. Re: how to achive multi-threading kind of behaviour in flex
            David_M.. Level 1
            IMO Flex should not be used to process a lot of data. You should send a request to a server (via HTTPRequest, WebServices,...) which will do the processing for your application and send you back the result.

            • 3. Re: how to achive multi-threading kind of behaviour in flex
              paulfeuer Level 1
              If the processed data that the server sends back is sizable, it IS an issue. One of the apps we're working on has to do a lot of processing to take the data from the server and merge it with the data on the client. The incremental data from the server is might have 100 rows, while the full set is several hundred or more. The server has already done the hard work of telling me ONLY the updated stuff, but I need to merge it with the old records. Right now this merge has the effect of hanging the user's scroll for example, and other UI interactions.
              • 4. Re: how to achive multi-threading kind of behaviour in flex
                ntsiii Level 3
                I have not see a good solution for this. Sreenivas solution is the one most often used.

                Here is an outside of the box solution, discussed, but not tried:
                build a processing application using AS2. instantiate it in the Html wrapper, and communicate with it via LocalConnection.

                Theoretically, it will be in a diferent VirtualMachine than the AS3 app, and thus let you use your pc's resources in parallel.

                The "use-the-server" solution is valid, but is not universal.

                Also, if your processing takes more than 60 seconds, you are totally screwed. FP8+ has a hard limit of 60 seconds processing, before it thinks the Player is hung.

                Tracy