Return-Path: X-Original-To: apmail-flex-users-archive@www.apache.org Delivered-To: apmail-flex-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F3B0518E77 for ; Fri, 26 Jun 2015 09:05:20 +0000 (UTC) Received: (qmail 95118 invoked by uid 500); 26 Jun 2015 09:05:20 -0000 Delivered-To: apmail-flex-users-archive@flex.apache.org Received: (qmail 95086 invoked by uid 500); 26 Jun 2015 09:05:20 -0000 Mailing-List: contact users-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@flex.apache.org Delivered-To: mailing list users@flex.apache.org Received: (qmail 95074 invoked by uid 99); 26 Jun 2015 09:05:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Jun 2015 09:05:20 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of markzolotoy@gmail.com designates 209.85.223.175 as permitted sender) Received: from [209.85.223.175] (HELO mail-ie0-f175.google.com) (209.85.223.175) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Jun 2015 09:03:05 +0000 Received: by iebrt9 with SMTP id rt9so71534808ieb.2 for ; Fri, 26 Jun 2015 02:04:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-type; bh=D5FPjYwFLhalkGYHHtT/C8WrK1FQruvaB00PG1BD4uI=; b=BJ5ajaAgExI9eY8MrhxevDffGNvyoQ1v2otX6CkuU/AJRggVYOAMMsqyn+1byTnQ1n TgdVkKQikUamoRxxC10GT1Omnc+oEyAPF3RG/vi8rd/Gf+vgoptFTJDz6eUGLV6FOuL9 5kH42LoWUmCfv7znihCC+b9gOBgrmo5bOtkRCv9OiHWFXOiOK9CHbh1t/hbufXkBUFUa xPnza0KSXoC0sGj4wBU0fGb1Xnf9i/pfkuogBksKwcPCGJtUX3OCLAxMJTNz6tQuihKj PaXKzeu2MZ4IEgGqFSC+GPWY/pSTnZadTzRESSEqcjkYVhsN/I1elhqBAHn0Bimt4iLz +Dbg== X-Received: by 10.50.79.196 with SMTP id l4mr1957209igx.48.1435309493598; Fri, 26 Jun 2015 02:04:53 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: mark goldin Date: Fri, 26 Jun 2015 09:04:44 +0000 Message-ID: Subject: Re: A script has executed for longer than .... To: "users@flex.apache.org" Content-Type: multipart/alternative; boundary=089e01183f488243c205196808ee X-Virus-Checked: Checked by ClamAV on apache.org --089e01183f488243c205196808ee Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Ok, I got it running but it still timing out. Here is some code: public function result(data:Object):void { var re:ResultEvent =3D ResultEvent(data); thread =3D new PseudoThread(UIComponent(Application.application).systemManager, processXML, re.result.resultData); } private function processXML(resultData:XMLList):void Did not change anything in PseudoThread. On Thu, Jun 25, 2015 at 3:39 PM Alex Harui wrote: > 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" wrote: > > >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=C3=ADa > > > >wrote: > > > >> More on that: > >> > >> > >> > http://www.jamesward.com/2008/11/21/drunk-on-software-episode-3-performan > >>ce-pitfalls-of-flexs-arraycollection/ > >> > >> On Thu, Jun 25, 2015 at 6:29 PM, Javier Guerrero Garc=C3=ADa > >> >> > > >> wrote: > >> > >> > Hi Mark: > >> > > >> > A long shot here: are you sure that, while you are processing the XM= L, > >> > you're NOT triggering constant UI updates on each operation? For > >> instance: > >> > if after processing each XML item, you are adding the final result t= o > >>an > >> > ArrayCollection, and you have some rendering component bound to that > >> > ArrayCollection, that could cause a total repaint of the item > >>renderers > >> FOR > >> > EACH XML ITEM processed, hence causing the timeout. Something simila= r > >> > happened to me a while ago, and after noticing and solving it, I can > >>say > >> > that 60 seconds are more than enough to process a few hundreds of > >> thousand > >> > XML items, and unless your XML is REALLY huge that should be enough = :) > >> > > >> > If that applies, the obvious workaround is: > >> > > >> > 1. Do all your updates and additions on a new ArrayCollection (not o= n > >>the > >> > one bound to the component's dataProvider), and then just swap the > >> > dataProvider of the component to point to the newly populated > >> > ArrayCollection instead > >> > 2. Or call "thefunctionthatdisabledautoupdates" in advance (don't > >> remember > >> > the exact name right now) on the bound arraycollection before starti= ng > >> > processing your XML, modify/update your arraycollection items, and > >>then > >> > enabling it afterwards. > >> > > >> > P.S. "myCollection.disableAutoUpdate(); ", that was it :) > >> > > >> > >> > http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf668 > >>d2-7fe7.html > >> > > >> > P.P.S. If none of that applies.... would some kind of "pagination" o= n > >>the > >> > UI solve it? > >> > > >> > On Thu, Jun 25, 2015 at 3:52 PM, mark goldin > >> > wrote: > >> > > >> >> I have a large xml data that UI needs to process. I am getting the > >>above > >> >> message about timing out. Not sure I can break my function into > >>smaller > >> >> pieces. Any other idea? > >> >> > >> >> Thanks > >> >> > >> > > >> > > >> > > --089e01183f488243c205196808ee--