5 Replies Latest reply on Mar 1, 2011 3:02 PM by Flex harUI

    Slow performance with custom comparator (AdvancedDataGrid sorting)

    hitenjava123

      I'm using Flex 3.4.

      I have an advancedDataGrid. Have 2 columns with numbers as data.

      For one column, I do not set any custom comparator function.

      For the other column, I set a custom comparator function which is exactly the same as the default one used by Flex. (The private function SortField.numericCompare).

       

      For both columns, I set the same data - 3000 Rows with values either 0 or 1.

       

      When i sort on column1 (the one with custom comparator), the sorting is much slower than on column2 (default Flex comparator).

       

      I went through the AdvancedDataGrid/SortField source codes but could not see why this could be happening as the comparator functions are the same in both cases.

       

      Also, I checked out this bug -

      http://bugs.adobe.com/jira/browse/SDK-13118

       

      But shouldn't this be applicable to both custom and default sorting?

       

      Can anyone help me out?