in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

DataExtender typed viewset speed performance

Last post 11-05-2007 12:04 PM by vbogey. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 11-02-2006 8:02 AM

    DataExtender typed viewset speed performance

    I read in this forum questions concerning speed performance.
    I made a simple test comparing Microsoft Typed dataset and C1
    Typed C1DataViewSet.
    The result was
    that Microsoft approach is 10 times faster than the C1DataViewSet one.
    Is this a
    C1DataViewSet known problem?
    Any suggestion to increase speed with your component?


    SETTINGS
    ---------------
    The DB is Microsoft Access 2003
    1
    single table (named 'Address') with 6 string fields and 1 autogenerated 'Id' field (the primary Key)

    No relation in the db
    No visual control
    No event is trapped from the datasets
    There's no evident connection waste-time

    THE CODE
    -----------------
    '
    Tests                                  the name of my project
    '
    TestDataSet                        my global dataset
    '
    AddressTableAdapter           my global typed DataAdapter
    'AddressDataViewSet            my global typed DataViewSet (linked to TestDataSet)
    '
    '

        'C1
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

            Dim dr As AddressDataViewSet.AddressRow
            Dim ii As Integer

            'Initializing
            Dim AddressDvs As Tests.AddressDataViewSet = New Tests.AddressDataViewSet

            'Execution
            Dim dt As Date = Now

            For ii = 0 To 1000
                dr = AddressDvs.Address.AddNew()
                dr.Address = "A" : dr.City = "B" : dr.State = "C" : dr.PR = "D" : dr.ZIP = "E" : dr.Note = "F"
                dr.EndEdit()
            Next
            AddressDvs.Update()

            MsgBox((Now - dt).ToString)

        End Sub

        'Microsoft
        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

            'Initializing
            Dim AddressDs As New Tests.TestDataSet
            AddressDs.DataSetName = "TestDataSet"
            AddressDs.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema

            Dim AddressDa As New Tests.TestDataSetTableAdapters.AddressTableAdapter
            AddressDa.ClearBeforeFill = True

            Dim dr As Tests.TestDataSet.AddressRow
            Dim ii As Integer

            'Execution
            Dim dt As Date = Now

            For ii = 0 To 1000
                dr = AddressDs.Address.NewAddressRow()
                dr.Address = "A" : dr.City = "B" : dr.State = "C" : dr.PR = "D" : dr.ZIP = "E" : dr.Note = "F"
                dr.EndEdit()
                Call AddressDs.Address.AddAddressRow(dr)
            Next
            AddressDa.Update(AddressDs.Address)

            MsgBox((Now - dt).ToString)

        End Sub



  • 11-02-2006 1:58 PM In reply to

    Re: DataExtender typed viewset speed performance

    Potentially an update operation executed by C1DataViewSet should take more time because it performs a number of additional operations for each row, which includes:
    1) Fetch a newly generated PK from server and updates client PK value.
    2) Re-fetches the whole newly inserted row from server in order to update the client row with another values autogenerated on server.
     
    But seems to be that we have some incorrectnesses in the update process optimization and the difference should not be so much. I'll look into it and try to improve.
     
    Thanks,
    Alex
    <Urukhai> wrote in message news:188273@test.componentone.com...
    I read in this forum questions concerning speed performance.
    I made a simple test comparing Microsoft Typed dataset and C1
    Typed C1DataViewSet.
    The result was
    that Microsoft approach is 10 times faster than the C1DataViewSet one.
    Is this a
    C1DataViewSet known problem?
    Any suggestion to increase speed with your component?


    SETTINGS
    ---------------
    The DB is Microsoft Access 2003
    1
    single table (named 'Address') with 6 string fields and 1 autogenerated 'Id' field (the primary Key)

    No relation in the db
    No visual control
    No event is trapped from the datasets
    There's no evident connection waste-time

    THE CODE
    -----------------
    '
    Tests                                  the name of my project
    '
    TestDataSet                        my global dataset
    '
    AddressTableAdapter           my global typed DataAdapter
    'AddressDataViewSet            my global typed DataViewSet (linked to TestDataSet)
    '
    '

        'C1
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

            Dim dr As AddressDataViewSet.AddressRow
            Dim ii As Integer

            'Initializing
            Dim AddressDvs As Tests.AddressDataViewSet = New Tests.AddressDataViewSet

            'Execution
            Dim dt As Date = Now

            For ii = 0 To 1000
                dr = AddressDvs.Address.AddNew()
                dr.Address = "A" : dr.City = "B" : dr.State = "C" : dr.PR = "D" : dr.ZIP = "E" : dr.Note = "F"
                dr.EndEdit()
            Next
            AddressDvs.Update()

            MsgBox((Now - dt).ToString)

        End Sub

        'Microsoft
        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

            'Initializing
            Dim AddressDs As New Tests.TestDataSet
            AddressDs.DataSetName = "TestDataSet"
            AddressDs.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema

            Dim AddressDa As New Tests.TestDataSetTableAdapters.AddressTableAdapter
            AddressDa.ClearBeforeFill = True

            Dim dr As Tests.TestDataSet.AddressRow
            Dim ii As Integer

            'Execution
            Dim dt As Date = Now

            For ii = 0 To 1000
                dr = AddressDs.Address.NewAddressRow()
                dr.Address = "A" : dr.City = "B" : dr.State = "C" : dr.PR = "D" : dr.ZIP = "E" : dr.Note = "F"
                dr.EndEdit()
                Call AddressDs.Address.AddAddressRow(dr)
            Next
            AddressDa.Update(AddressDs.Address)

            MsgBox((Now - dt).ToString)

        End Sub





    http://home.componentone.com/cs/forums/188273/ShowPost.aspx

  • 11-02-2006 5:08 PM In reply to

    Re: DataExtender typed viewset speed performance

    Thank you for the reply.
    Please let me know if you succeed, because this is a serious drowback in using C1DataExtenders when performing a lot of updates.
  • 12-22-2006 11:47 AM In reply to

    Re: DataExtender typed viewset speed performance

    More than a month
    Still waiting news
    Any improvement?

     Urukhai wrote:
    Thank you for the reply.
    Please let me know if you succeed, because this is a serious drowback in using C1DataExtenders when performing a lot of updates.
  • 11-05-2007 12:04 PM In reply to

    Re: DataExtender typed viewset speed performance

    Did anyone succeed in using C1DataViewSet.Update() with larger number of data?

     

    In my test project based on “ViewSet_Define_Fill_Update” updating only 1 row from a DataSet containing 2 related tables (Parent, Child) with 6,000 rows each takes 10 minutes on 3.2GHz CPU.

    At this point I say that the problem is not in SQL Server (I used SQL Profiler to trace the update).

     This only happens when both Views are be bound to either TrueDBGrid or FlexGrid!!!

    I guess this explains why “ViewSet_Define_Fill_Update” sample project is using Microsoft DataGrid and not one of C1 grid components.

     

    Interesting enough you can see the crawling speed of Update() when running C1TrueDBGrid bound to the original NwindDataSet  were total # or rows does not exceed 3,000.

     

    I’m running T3/2007 release code

    Bogdan

Page 1 of 1 (5 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.