[Mono-bugs] [Bug 357947] [Performance] Performance problem with System.Data

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Oct 7 14:40:05 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=357947

User dglick at dracorp.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=357947#c9


David Glick <dglick at dracorp.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dglick at dracorp.com




--- Comment #9 from David Glick <dglick at dracorp.com>  2009-10-07 12:40:02 MDT ---
Has there been any progress or status on this bug recently?

I have a major performance issue and I believe it's related to the problem
reported here. Specifically, on DataTable.Rows.Add() I am seeing huge time
increases compared to MS .NET on the order of two magnitudes or more. Using the
Mono profiler, I've traced the problem back to
System.Data.Common.Index::RebuildIndex() getting called on every Add, which in
turn kicks off a bunch of sorting and comparison operations. Using
DataTable.BeginLoadData() does not appear to impact the index rebuilding either
- I get the exact same number of RebuildIndex calls with or without
BeginLoadData. A part of the profile output is below:

########################
 1578622.031       1  1578622.031   Identifiers.Identifiers::GetAllIds()
  Callers (with count) that contribute at least for 1%:
           1  100 % Identifiers.Identifiers::GetAllIds()
########################
 1578622.031       1  1578622.031   Identifiers.Identifiers::GetAllIds()
  Callers (with count) that contribute at least for 1%:
           1  100 % Identifiers.Identifiers::Timer1_Tick(object,EventArgs)
########################
 1578497.049     139  11356.094  
Identifiers.Identifiers::GetIDsInFile(DataFile)
  Callers (with count) that contribute at least for 1%:
         139  100 % Identifiers.Identifiers::GetIDsInFile(DataFile)
########################
 1578497.049     139  11356.094  
Identifiers.Identifiers::GetIDsInFile(DataFile)
  Callers (with count) that contribute at least for 1%:
         139  100 % Identifiers.Identifiers::GetAllIds()
########################
 1546425.869    2910  531.418   System.Data.DataRowCollection::Add(DataRow)
  Callers (with count) that contribute at least for 1%:
        2910  100 % Identifiers.Identifiers::GetIDsInFile(DataFile)
########################
 1545691.650    5820  265.583  
System.Data.DataRowCollection::AddInternal(DataRow,DataRowAction)
  Callers (with count) that contribute at least for 1%:
        5820  100 % System.Data.DataRowCollection::AddInternal(DataRow)
########################
 1545691.650    5820  265.583  
System.Data.DataRowCollection::AddInternal(DataRow)
  Callers (with count) that contribute at least for 1%:
        2910  50 % System.Data.DataRowCollection::Add(DataRow)
        2910  50 % System.Data.DataView::ToTable(string,bool,string[])
########################
 1545613.541    5820  265.569  
System.Data.DataTable::ChangedDataRow(DataRow,DataRowAction)
  Callers (with count) that contribute at least for 1%:
        5820  100 %
System.Data.DataRowCollection::AddInternal(DataRow,DataRowAction)
########################
 1545582.296    5820  265.564  
System.Data.DataTable::OnRowChanged(DataRowChangeEventArgs)
  Callers (with count) that contribute at least for 1%:
        5820  100 %
System.Data.DataTable::ChangedDataRow(DataRow,DataRowAction)
########################
 1545582.296    2910  531.128  
System.Data.DataView::OnRowChanged(object,DataRowChangeEventArgs)
  Callers (with count) that contribute at least for 1%:
        2910  100 % System.Data.DataTable::OnRowChanged(DataRowChangeEventArgs)
########################
 1544191.998    2913  530.104   System.Data.DataView::UpdateIndex(bool)
  Callers (with count) that contribute at least for 1%:
        2910  99 %
System.Data.DataView::OnRowChanged(object,DataRowChangeEventArgs)
########################
 1540724.182    2915  528.550   System.Data.Common.Index::Reset()
  Callers (with count) that contribute at least for 1%:
        1458  50 % System.Data.Common.Index::.ctor(Key)
        1456  49 %
System.Data.DataTable::GetIndex(DataColumn[],ListSortDirection[],DataViewRowState,IExpression,bool,bool)
########################
 1540708.561    2915  528.545   System.Data.Common.Index::RebuildIndex()
  Callers (with count) that contribute at least for 1%:
        2915  100 % System.Data.Common.Index::Reset()
########################
 1539739.939    2913  528.575  
System.Data.DataTable::GetIndex(DataColumn[],ListSortDirection[],DataViewRowState,IExpression,bool,bool)
  Callers (with count) that contribute at least for 1%:
        2913  100 %
System.Data.DataTable::GetIndex(DataColumn[],ListSortDirection[],DataViewRowState,IExpression,bool)
########################
 1539739.939    2913  528.575  
System.Data.DataTable::GetIndex(DataColumn[],ListSortDirection[],DataViewRowState,IExpression,bool)
  Callers (with count) that contribute at least for 1%:
        2913  100 % System.Data.DataView::UpdateIndex(bool)
########################
 1532975.928    2911  526.615   System.Data.Common.Index::Sort()
  Callers (with count) that contribute at least for 1%:
        2911  100 % System.Data.Common.Index::RebuildIndex()
########################
 1532960.305    2911  526.610   System.Data.Common.Index::MergeSort(int[],int)
  Callers (with count) that contribute at least for 1%:
        2911  100 % System.Data.Common.Index::Sort()
########################
 1525462.060 33052482    0.046  
System.Data.Common.Key::CompareRecords(int,int)
  Callers (with count) that contribute at least for 1%:
    33036205  99 % System.Data.Common.Index::MergeSort(int[],int[],int,int)
########################
 1511668.371 69327244    0.022   System.Data.DataColumn::CompareValues(int,int)
  Callers (with count) that contribute at least for 1%:
    69327244  38 % System.Data.Common.Key::CompareRecords(int,int)
########################
 1494391.171 69327244    0.022  
System.Data.Common.DataContainer::CompareValues(int,int)
  Callers (with count) that contribute at least for 1%:
    69327244  38 % System.Data.DataColumn::CompareValues(int,int)
########################
 1383822.764 69327174    0.020  
System.Data.Common.StringDataContainer::DoCompareValues(int,int)
  Callers (with count) that contribute at least for 1%:
    69327174  38 % System.Data.Common.DataContainer::CompareValues(int,int)
########################

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list