incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Mclean <jus...@classsoftware.com>
Subject Too much validation occurring in AdvancedDataGrid
Date Wed, 07 Mar 2012 03:32:52 GMT
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/src/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
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message