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 BEE2918BC7 for ; Thu, 25 Jun 2015 16:34:19 +0000 (UTC) Received: (qmail 48295 invoked by uid 500); 25 Jun 2015 16:34:19 -0000 Delivered-To: apmail-flex-users-archive@flex.apache.org Received: (qmail 48264 invoked by uid 500); 25 Jun 2015 16:34:19 -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 48252 invoked by uid 99); 25 Jun 2015 16:34:18 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jun 2015 16:34:18 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 7C57D1A60FA for ; Thu, 25 Jun 2015 16:34:18 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.9 X-Spam-Level: ** X-Spam-Status: No, score=2.9 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id lu2nP53_rPng for ; Thu, 25 Jun 2015 16:34:12 +0000 (UTC) Received: from mail-vn0-f52.google.com (mail-vn0-f52.google.com [209.85.216.52]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id DB7C643DA9 for ; Thu, 25 Jun 2015 16:34:11 +0000 (UTC) Received: by vnbf62 with SMTP id f62so11821014vnb.10 for ; Thu, 25 Jun 2015 09:34:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=DuI+Byg5MVhPie1EimwKFu439Ust7UfFUG7LL1SbTAQ=; b=z48ivLbjhm02dNirtFgTYuOJ8k72Qpb+KyxCPBTwy4OsJhHAmVxtwqf8/MLYzSuChL +82Q2guH6HmqEx8hXE+RfijL7OG4YVe2aZJV0xikocz1eQJLjGRhOgG4RJDaYp9DVcTl rw/BTsNvKZOKvrGvrL8NDQSfDuHdwGq2OkC6LSlVVaT4Io6T/NT0lllDkQIEh9ynb2La +ycUQao4j7K+tFosQb6lOxIQpBKbXn0tIRG+oHo3R+0Ol8pNi1Y9yzMJCvOo2jIA9WIw vuAM8zKAT1DkrpuPO08BYT+58k2R70r81l1Xj40rTVPzqMtUQ28dwO/zrJ19XwdhkzIS DhPA== X-Received: by 10.53.0.226 with SMTP id bb2mr36435464vdd.4.1435250045307; Thu, 25 Jun 2015 09:34:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.64.200 with HTTP; Thu, 25 Jun 2015 09:33:45 -0700 (PDT) In-Reply-To: References: From: =?UTF-8?Q?Javier_Guerrero_Garc=C3=ADa?= Date: Thu, 25 Jun 2015 18:33:45 +0200 Message-ID: Subject: Re: A script has executed for longer than .... To: users Content-Type: multipart/alternative; boundary=001a1134c6e61d545605195a31ea --001a1134c6e61d545605195a31ea Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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=C3=ADa wrote: > 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 > ArrayCollection, that could cause a total repaint of the item renderers F= OR > EACH XML ITEM processed, hence causing the timeout. Something similar > 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 thousan= d > 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 on 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 remembe= r > the exact name right now) on the bound arraycollection before starting > 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" on 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 >> > > --001a1134c6e61d545605195a31ea--