Unplanned
Last Updated: 20 Feb 2024 11:17 by ADMIN
ADMIN
Aylin
Created on: 01 Nov 2016 15:40
Category: SpreadProcessing
Type: Bug Report
7
SpreadProcessing: Setting values of cells referred from formulas causes performance issues due to memory leak
CellSelection.SetValue method causes memory leak of CellReferenceRangeExpression objects in some cases when cell value is referenced by formulas. The memory leak is small, but the remaining CellReferenceRangeExpression continue to listen to some events, causing performance issues when their number become large - the time to set the value increases with each set.
11 comments
ADMIN
Yoan
Posted on: 20 Feb 2024 11:17

Hello Joel,

First of all, I am glad to hear that you were able to find a solution that satisfies your requirements. I understand the importance of the matter and how it is affecting you for which I once again apologize.

We highly value the time and effort you've spent getting back to us with this information and I would be glad if you could elaborate further on the workaround that you have settled with. Any feedback is always welcome and appreciated as it will become part of this thread that others can benefit from. 

Regards,
Yoan
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Joel
Posted on: 13 Feb 2024 15:10

Here is the link to my ticket: https://www.telerik.com/account/support-center/view-ticket/1640614

Without the workaround, it took 12 minutes to complete 7800 rows of cell update.
With the workaround, it took only 43s.
I have commitment to my client to provide the most optimum system, and i certainly don't have the luxury to tell my client to just bear with the low performance system.
It is after spending countless hours of looking for performance tips: https://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/performance and submitting a ticket that i found the workaround

ADMIN
Yoan
Posted on: 13 Feb 2024 14:21

Hello Joel,

I completely understand the importance of this case, how it might be affecting you, and the setbacks it can cause in certain scenarios.

However, we have a system that prioritizes the logged tasks in our Feedback Portal by taking into consideration various factors like demand, complexity, resources, etc. We are doing everything in our power to answer customer requests and needs by resolving these tasks as fast as possible, but some receive less attention than others, which is why they can sometimes be delayed, just like this one.

Currently, this task is not on our roadmap for the foreseeable future and I also wouldn't want to mislead you by giving you any incorrect information just for the sake of it. Once any item is resolved, we immediately update the public feedback page to notify our clients so the best thing I can offer is to subscribe to the task in order to track its progress and don't miss potential updates.

Thank you for your understanding.

Regards,
Yoan
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Joel
Posted on: 13 Feb 2024 10:19

It should be given a fix by now.

ADMIN
Dimitar
Posted on: 28 May 2020 12:26

Hi,

A possible workaround when you need to set a large number of cells it to suspend the ProertyChanged event of the Cells. Currently, this can be done only with reflection:

 

Worksheet worksheet = workbook.Worksheets[0];

var field = worksheet.Cells.GetType().GetField("propertyBag", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(worksheet.Cells);
string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Telerik.Windows.Documents.Spreadsheet.dll");
Assembly assembly = Assembly.LoadFile(path);
Type propertyBag = field.GetType();
MethodInfo suspend = propertyBag.GetMethod("SuspendPropertyChanged", BindingFlags.NonPublic | BindingFlags.Instance);
MethodInfo resume = propertyBag.GetMethods(BindingFlags.NonPublic | BindingFlags.Instance).Where(x => x.Name == "ResumePropertyChanged").FirstOrDefault();

suspend.Invoke(field, null);

//Update cells values

resume.Invoke(field, null);

 

Regards,
Dimitar
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
ADMIN
Tanya
Posted on: 03 Feb 2017 16:55
Hello Diego,

The item is with status "Approved", which means it is included in our backlog. However, the issue is not scheduled for fixing in the next release and I am unable to say when a fix might be available.

Regards,
Tanya
Diego
Posted on: 01 Feb 2017 20:55
is this fixed ?
ADMIN
Stefan
Posted on: 09 Dec 2016 15:00
@Adel do you mean the Speadsheet control or the SpreadProcessing library?
Adel Chenni
Posted on: 04 Dec 2016 16:52
We are noticing the same thing with telerik mvc spreadsheet. 
ADMIN
Boby
Posted on: 07 Nov 2016 11:42
Thanks for the additional information @Mark. We will update the item with our latest findings. If you find any other relevant information, let us know - here or in the support system.
Mark
Posted on: 01 Nov 2016 21:44
I don't think that the description is exactly correct.  The problem seems to happen no matter the size of the spreadsheet.  The test program that Mike wrote (see this thread: http://www.telerik.com/forums/spreadsheet-slows-exponentially-with-repeated-calculations) calls SetValue() repeatedly for the same cell.  This is a very small spreadsheet.

It looks like every time that SetValue() is called, it gets slower.  And this is not a new issue.  We have been waiting for quite a while for SP1 to get this fix and now that we have tested it, we find that the speed has improved, but it still slows down by a factor of 25-30 times when SetValue() is called 30,000 times.  I suggest that you test using Mike's test program, as it clearly shows the issue.

So please try to address this as soon as possible and please make it available as a hotfix, as this is really a problem for me.

Thanks,
Mark