Spread.NET 12 significantly slower on databound sheet(s)

Posted by: info on 27 August 2019, 5:13 am EST

    • Post Options:
    • Link

    Posted 27 August 2019, 5:13 am EST

    Using LegacyBehaviors.All

    Test with adding 1000 empty rows to a databound sheet.

    R12 took 326 ms, R9 took 286 ms

    Result about 14% slower.

    Test with adding 620 filled rows with a few additional operations for the same.

    R12 took 13,546 ms and R9 took 598 ms

    That’s about 2,165% slower! then R9 (yes, you read that right)

    Any suggestions?

    -PietF

  • Posted 28 August 2019, 1:54 am EST

    Hello PietF,

    Please use SuspendLayout and ResumeLayout methods to improve performance.```

    Stopwatch s = new Stopwatch();

    s.Start();

    fpSpread1.SuspendLayout();

    fpSpread1.Sheets[0].AddRows(28000, 1000);

    fpSpread1.ResumeLayout();

    s.Stop();

    var time = s.Elapsed;

    Debug.WriteLine(time.Milliseconds.ToString());

    
    Best wishes,
    Ruchir
  • Posted 28 August 2019, 2:37 am EST

    Hi Ruchir,

    that would be too easy, of course I’m using SuspendLayout!

    I’m using the methods AddUnboundRows and AddRowToDataSource (already using this for more then 10 years now)

    and adding them one by one. (using about 60 bound columns btw)

    Today I tried to narrow it down but still haven’t found it yet.

    One thing is certain: Spread has changed its behaviour significantly.

    If I can’t find it I have to fall back on R9.0 (but that would be a shame)

    Regards PietF

  • Posted 29 August 2019, 1:24 am EST

    Hello,

    I tried replicating the issue by preparing a simple application with 28000*60 cells added through AddUnboundRows method and compared its performance in Spread9 and Spread12. At my end, the performance is similar.

    So, could you share your application with us for investigation? If there is any issue related to confidentiality of the application, you may share the same with us at https://supportone.componentone.com

    Thanks,

    Ruchir

  • Posted 29 August 2019, 6:29 pm EST

    Hi Ruchir,

    found the culprit.

    It’s weird but it looks like when you are in SuspendLayout then operations not used on the spreadsheet are significant slower. I’ve solved that.

    The end result is about 10% slower. I can live with that.

    Testing on a larger number indeed gives approximately the same result.

    Testing on 1000 rows however seems to be slower.

    Regards PietF

  • Posted 1 September 2019, 11:58 pm EST

    Hi,

    Glad, that you were able to resolve the issue.

    If you’re still facing any issue, please let us know.

    ~Ruchr

Need extra support?

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

Learn More

Forum Channels