Load Data for a Second Time to Spread is Very Slow

Posted by: soonhui-ngu-gmail-com on 8 September 2017, 5:29 am EST

  • Posted 8 September 2017, 5:29 am EST

    For certain reason, if you have a chart, and you try to load data to a sheetview a second time. It would be very slow.

     

    Here are the steps to reproduce the problem:

     1. Download the zip file

    2. Compile it

    3. there are 2 combo box, select the one at the top, change the index to 0. Note that it takes only a short time for the graph to come up

    4. Now change the index to 1, it now takes a loong time for the graph to come up.

    5. If you profile it, you will find that  this method is the bottleneck:

     

             private double[,] LoadData(int index)

            {

                var doubMatrix = new double[6000, 2];

                for (int i = 0; i < doubMatrix.GetLength(0); i++)

                {

                    for (int j = 0; j < doubMatrix.GetLength(1); j++)

                    {

                        if (j == 0)

                        {

                            doubMatrix[i, j] = i;

                        }

                        else

                        {

                            doubMatrix[i, j] = 2*(doubMatrix[i, 0]+index);

                        }

                    }

                }





                return doubMatrix;

            }

     
     
    6. But why this method is fast when called the first time, but slow on second time?
  • Posted 8 September 2017, 5:29 am EST

    I’ve sent the project via email to powersupport@grapecity.com , because I can’t attach the project in this post. 

  • Posted 8 September 2017, 5:29 am EST

    Hello,

    I am able to replicate your isssue and have reported it as a bug in Spread and the bug number for the same is #99918984 and it will be fixed in the future maintenance release of Spread.

    Thanks.

  • Posted 8 September 2017, 5:29 am EST

    Hello,May I know when it will be fixed ?

    This is quite an urgent case for us. 

  • Posted 8 September 2017, 5:29 am EST

    Hello,

    Maintenance release is generally out every 3 months and our last maintenance release was released few days back and next maintenance release is expected in other 3 months time somewhere in February. However, I have increased the priority of your issue and it will be fixed in future release.

    Thanks.

     

  • Posted 8 September 2017, 5:29 am EST

    Hello,



    Bug number # 99918984 reported earlier in this thread has been fixed in our new maintenance release which was out yesterday. I would request you to upgrade your application to the latest build and you can get the latest build from this link ftp://ftp.fpoint.com/SpreadWinForms5/. And here is the change you need to make to your application:-

    Use SuspendAutoUpdateChartData/ResumeAutoUpdateChartData



       

    &nbsp;&nbsp;&nbsp; private static void SetSheetValue(SheetView sheetView, double[,] allValues)

    &nbsp;&nbsp;&nbsp; {

    &nbsp;&nbsp;&nbsp; sheetView.SuspendAutoUpdateChartData();

    &nbsp;&nbsp;&nbsp; sheetView.RowCount = allValues.GetLength(0);

    &nbsp;&nbsp;&nbsp; for (int i = 0; i &lt; allValues.GetLength(0); i++)

    &nbsp;&nbsp;&nbsp; {

    &nbsp;&nbsp;&nbsp; for( int j=0; j&lt; allValues.GetLength(1); j++)

    &nbsp;&nbsp;&nbsp; {

    &nbsp;&nbsp;&nbsp; sheetView.Cells[i, j].Value = allValues[i, j];

    &nbsp;&nbsp;&nbsp; }

    &nbsp;&nbsp;&nbsp; }

    &nbsp;&nbsp;&nbsp; sheetView.ResumeAutoUpdateChartData();



    &nbsp;&nbsp;&nbsp; }

    </p><p>Thanks.

    </p>

  • Posted 10 October 2018, 10:56 pm EST

    I have tried to attach my file on my Gmail account but whenever I clicked on attach file button then it takes time to upload the data on Gmail then I have visited this link https://www.gmailtechnicalsupportnumbers.com/gmail-password-recovery/ and resolved this issue.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels