From flex-dev-return-6105-apmail-incubator-flex-dev-archive=incubator.apache.org@incubator.apache.org Wed Mar 7 03:33:33 2012 Return-Path: X-Original-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CCC139914 for ; Wed, 7 Mar 2012 03:33:33 +0000 (UTC) Received: (qmail 29593 invoked by uid 500); 7 Mar 2012 03:33:33 -0000 Delivered-To: apmail-incubator-flex-dev-archive@incubator.apache.org Received: (qmail 28956 invoked by uid 500); 7 Mar 2012 03:33:27 -0000 Mailing-List: contact flex-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: flex-dev@incubator.apache.org Delivered-To: mailing list flex-dev@incubator.apache.org Received: (qmail 28922 invoked by uid 99); 7 Mar 2012 03:33:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2012 03:33:26 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.213.47] (HELO mail-yw0-f47.google.com) (209.85.213.47) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2012 03:33:18 +0000 Received: by yhjj56 with SMTP id j56so2622708yhj.6 for ; Tue, 06 Mar 2012 19:32:57 -0800 (PST) Received: by 10.236.138.110 with SMTP id z74mr992299yhi.114.1331091177523; Tue, 06 Mar 2012 19:32:57 -0800 (PST) Received: from [192.168.0.4] (124-149-169-202.dyn.iinet.net.au. [124.149.169.202]) by mx.google.com with ESMTPS id q5sm21925189anm.21.2012.03.06.19.32.55 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 06 Mar 2012 19:32:57 -0800 (PST) From: Justin Mclean Content-Type: multipart/alternative; boundary="Apple-Mail=_2C907BD9-8054-48A2-A2A4-30428F0C1584" Subject: Too much validation occurring in AdvancedDataGrid Date: Wed, 7 Mar 2012 14:32:52 +1100 Message-Id: <7BCAEDC6-2D48-49B0-A4E2-CDCEFD9894D4@classsoftware.com> To: flex-dev@incubator.apache.org Mime-Version: 1.0 (Apple Message framework v1257) X-Mailer: Apple Mail (2.1257) X-Gm-Message-State: ALoCoQlXNGjnzCUCFH/V0iO/XWP4NxYNVBbYbc8tc1i9m0UsbpoaZMdWxQxQN/hdMiAgnbjmatLY X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_2C907BD9-8054-48A2-A2A4-30428F0C1584 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi, Is a bit quiet around here so I thought I bring up something odd I found = a while ago. If you run the sample found here on the whiteboard: = http://svn.apache.org/viewvc/incubator/flex/whiteboard/jmclean/datagrid/sr= c/TooMuchValidation.mxml and move the mouse about you'll see how many times validiateNow is being = called for each cell. If you move sideways cell to cell you sell that each cell is the row is = validated twice and the first cell 4 times If you move up or down a row you'll see that each cell in both rows are = validated and the first cells twice. Obviously this could be optimised. With large datagrids (and custom item = renderers) this slows down things a little. So a few questions: Why is the first cell in each row being validated more than once? (I've = not worked this out so far). One of the validateNow is being called from drawItem in AdvancedList = Base (line 4800 or so) like so: if (item is IFlexDisplayObject) { if (item is IInvalidating) { IInvalidating(item).invalidateDisplayList(); IInvalidating(item).validateNow(); } } Do we need to call invalidateDisplayList as validateNow would also call = updateDisplayList right? As no properties are changed on the item (as = far as I can tell) I'm not even sure we need to call validateNow at all = perhaps just invalidateDisplayList is enough? Does drawItem need to = called at all for the entire row if moving mouse over cell left or = right? Hopefully someone else has encountered into this issue and/or can cast = some more light on it. This is not as far as I know an existing issue reported in the Adobe bug = base. Thanks, Justin= --Apple-Mail=_2C907BD9-8054-48A2-A2A4-30428F0C1584--