We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Poor Performance with high amount of CalendarEvents

Dear Syncfusion Team,
currently we are testing your Xamarin.Forms controls SfCalendar and SfScheduler in our mobile app. We have an existing xamarin.forms mvvm app and wanting to give our customers (Doctors) the opportunity to display their appointments/calendar events. It's not uncommon that our customers have about 50 appointments/calendar events per day, 5-6 days per week.
We tried SfCalendar and SfScheduler (both Version No.: 14.2.0.28) but hitting huge performance issues while displaying your control. The data which represents the appointments/calendar events are loaded very fast from the server but when adding or removing items from the Collection which is bound to the DataSource Property of the respected control took a very huge amount of time. The app is not responding while switching from one month to the next and sometimes it also terminates.
Are you aware of this problem or do you have some tips for me to try out? Are there any chances that this will be fixed in a future version?

Thanks in advance

Christian

16 Replies

HM Hemalatha Marikumar Syncfusion Team August 25, 2016 03:49 AM UTC

Hi Christian,

Query: Performance issue in SfCalendar control

We were able to reproduce the reported issue in Xamarin.iOS platform and have logged defect report regarding this. A support incident to track the status of this defect has been created under your account.

Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents/

Query: Performance issue in SfSchedule control

Please share this below response to the customer for Schedule control query.
 
We have checked and we are unable to reproduce the mentioned performance issue with SfSchedule control in Xamarin Forms.  Based on the provided information we have prepared sample in MVVM model, please find the sample below,
 
Sample link: http://www.syncfusion.com/downloads/support/forum/125531/ze/ScheduleSample_Performance931442448 

If the given sample doesn`t meet your requirement, could you please modify the provided sample along with its replication procedure and send it to us? This will help us to analyze it and provide you a solution.

Regards,
Hemalatha M.R
 



CF Christian Fischer August 25, 2016 12:22 PM UTC

Hi Hemalatha,
thanks for providing us the sample. I refered it (only the iOS Project because that's the interesting one for now) and changed it to meet our business context.
Just a little reminder as introduction:
We want to provide our Customers (Doctors) a Scheduler for their healthcare-center / doctors office.
The worst case is an organization with more than one doctor so it is theoratical possible to have about 50 appointments per day to display in the scheduler (Each doctor with 16 appointments (avg time of 30min) on a working day (8h-18h)).
That means about 250 appointments per week (Mo-Fr) and about 1000 per Month. Considering this, I've changed your provided sample to build/initialize the ScheduleAppointmentCollection. Because of the fact that the user can start viewing the Scheduler in MonthView I decided to initially load all appointments for the current month. So the first loading of the page takes some time but finally displays it. BTW: In MonthView the small dots are not displayed! Bug?
Now comes the problematic part:
When the user changes the visibleDates (swiping left, right to next/previous month or touches on ScheduleView-Buttons to change the Scheduler View) I catch the fired event 'OnVisibleDatesChangedEvent' and load the appointments for all months in visibleDates if it's not already in AppointmentCollection and update the bound AppointmentCollection.
At this point the app crashes after long time of not responding and waiting with the following exception in the output window:
SchedulePerformanceSampleiOS(163,0xca0f000) malloc: *** mach_vm_map(size=8388608) failed (error code=3)
*** error: can't allocate region securely
*** set a breakpoint in malloc_error_break to debug
2016-08-25 12:50:51.714 SchedulePerformanceSampleiOS[163:3178105] critical: Stacktrace:
2016-08-25 12:50:51.714 SchedulePerformanceSampleiOS[163:3178105] critical:   at <unknown> <0xffffffff>
2016-08-25 12:50:51.714 SchedulePerformanceSampleiOS[163:3178105] critical:   at (wrapper managed-to-native) ApiDefinition.Messaging.void_objc_msgSend (intptr,intptr) <0x00012>
2016-08-25 12:50:51.714 SchedulePerformanceSampleiOS[163:3178105] critical:   at Syncfusion.SfSchedule.iOS.SFSchedule.ReloadData () <IL 0x0001b, 0x000ab>
SchedulePerformanceSampleiOS(163,0xca0f000) malloc: *** mach_vm_map(size=8388608) failed (error code=3)
*** error: can't allocate region securely
*** set a breakpoint in malloc_error_break to debug
2016-08-25 12:50:51.714 SchedulePerformanceSampleiOS[163:3178105] error: Could not allocate 1952 bytes
Launch succeeded. The app  'SchedulePerformanceSampleiOS' has been successfully launched on 'iPad Air 2 iOS 9.3'.
The app has been terminated.

I will attach my modified sample to this post so you can refer it and hopefully reproduce the problem.

If you or your team has an better approach for reloading the appointments/modifying the ScheduleAppointmentCollection, please let it me know.

Kind regards
Christian


Attachment: ScheduleSample_Performance125531_a377107.zip


SP Subburaj Pandian Veluchamy Syncfusion Team August 26, 2016 06:41 AM UTC

Hi Christian,

We have created a new support incident under your account to track the status of your latest query. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Please let us know, if you have any query.

Regards,
Subburaj Pandian V.




SI Siggi October 19, 2016 05:29 AM UTC

Hello,
I´m facing the same problems.
Adding/Removing a larger amount of appointments from the ScheduleAppointmentCollection takes lots of time and the app is blocking during this time.
The workflow is to get the appointments from DB for a date range (e.g. a month) when using the arrow buttons, removing the "old" appointments from  ScheduleAppointmentCollection and adding the new ones.

Seen in Windows81 and Android app, sfSchedule version 14.3451.0.49
Have there been any progress in this issue during the last months?
Regards


SP Sivakumar Punniya Moorthi Syncfusion Team October 20, 2016 02:10 PM UTC

Hi Christian ,

Thank you for the update.

We have already considered to enhance performance of Schedule control in various aspects with multiple scenarios including ScheduleAppointments (initialize/ loading ), and it will be included in our upcoming volume 4 release. Also Could you please share more details related to performance (if you face any other particular scenarios)? It will be helpful for us further improvement of performance of our control.

Regards,
Sivakumar P


SI Siggi October 21, 2016 06:58 AM UTC

Hello Sivakumar,
I´m not Christian, just hijacked his thread ;)
The main problem is that modifing the ScheduleAppointments collection AFTER the inital load/display takes lots of time.

workflow:
- the control is inital displayed in weekview, the appointments for the current week (50-60 or more) are loaded from database and added to ScheduleAppointments, works fine.
- the user switches to the next week via swipe or arrow.
- the appointments for the next week are loaded from database. Now there are two ways of handling:
  a) Removing the "old" appointments from ScheduleAppointments with .Remove() and add the new ones with .Add() ---> EXTREM slow
  b) construct a new  ScheduleAppointmentsCollection, add the new appointments and asign it to ScheduleAppointments ---> still VERY slow

As Christian wrote, if there are better ways of dealing with this, please let us know...
Regards
Siggi



SI Siggi October 21, 2016 07:43 AM UTC

I created a small demo project, using the two different methods mentioned in my previous post.
You can switch between them using the picker at the top.

Regards
Siggi

Attachment: SfScheduleDemo_644d14a3.7z


SP Sivakumar Punniya Moorthi Syncfusion Team October 24, 2016 10:25 AM UTC

Hi Siggi,

Sorry for the inconvenience caused.

Thank you for the details regarding schedule performance issue. As per previous update we have already consider the performance enhancement in Schedule Xamarin forms. We will include the mentioned scenario also(“ ScheduleAppointments collection AFTER the inital load/display takes lots of time”) and the issue fix will be included in our upcoming volume 4 release.

Please let us know, if you need any further assistance on this.

Regards,
Sivakumar P




JF Jhonatan Fernando March 28, 2017 02:25 PM UTC

I have the same problem. Do you have some news about this problem?


SP Subburaj Pandian Veluchamy Syncfusion Team March 29, 2017 10:44 AM UTC

Hi Jhonatan,

 
Thanks for your interest in Syncfusion products. 

We have created a support incident under your account to track the status of this query. Please log on to our support website to check for further updates. 
 
 
Please let us know, if you have any query.

Regards, 
Subburaj Pandian V. 



AD Andy Dent July 18, 2017 03:48 PM UTC

I'm interested in these performance issues and in customising cell rendering in general, as I'm migrating a rostering app from pure native apps to using Xamarin Forms.

I suspect if you have major problems with making significant changes to the CalendarEventCollection that it is firing a change event every time and so some batch mechanism is needed, maybe suppress showing inline events whilst adding the items then toggle it back on. when you have finished your batch would help?

I also noticed that CalendarInlineEvent is a full Xamarin.Forms.View which seems a very heavy-weight class to be drawing in these quantities. 



RK Rathana Kumar Sekar Syncfusion Team July 19, 2017 12:54 PM UTC

Hi Andy Dent,

Thanks for your update.

Query 1: Issue with dynamically updating CalendarEventCollection

We have checked the reported issue from our side and we need more details to provide appropriate solution on this.

So, Could you please provide below mentioned details,

1)Which exact scenario CalendarEventCollection gets updated.
2)Simple sample which replicates the reported issue.

It will help us to provide appropriate solution on this.

Query 2: CalendarInlineEvent is a full Xamarin.Forms.View which seems a very heavy-weight class to be drawing in these quantities.

We have been providing support for SfCalendar in Xamarin Forms using renders since the controls has been implemented in Native platforms[Android,iOS and UWP]. Hence for binding and mapping of properties we need to create a class using by inheriting from View so that we can get the events and values on dynamic changes. Please let us know if you have been facing any issues related to this so that we can analyse further and assist you.


Regards,
Rathanakumar S.


JP Joth Pigott November 1, 2017 10:22 AM UTC

Hi,

Just wondered whether anybody had made progress on this.  We've built a Xamarin.Forms app with SfScheduler that has around 100 - 150 appointments per month and the performance is shockingly slow - it takes around 10 seconds to display a page when swipped in month view.  I'm loading from local database when visible dates are changed but have also tried pre-loading many months of appointments and hence no loading new appointments when visible dates changed and that is no better.  Seems a major problem rendering month view.  Can Syncfusion supply a heavily populated sample project to download so I can see whether they do something I'm not doing.

Hope to hear from someone.  Thanks Joth



SG Swathi Gopal Syncfusion Team November 2, 2017 12:01 PM UTC

 
Hi Joth, 
  
Thanks for contacting Syncfusion support. 
 
Already support incident for the same query has been created under your account to track the status of this query. Please log on to our support website to check for further updates. 
 
 
Please let us know, if you have any query. 
 
Regards, 
Swathi G 



SM Smokeball December 17, 2018 10:12 AM UTC

We are looking into using this scheduler control and just want to know if these performance issues are now addressed in the current release of the Xamarin Forms control?

Thanks.


AA Arulraj A Syncfusion Team December 18, 2018 01:17 PM UTC

Hi Winston, 
 
Thanks for using Syncfusion product. 
 
Yes, we have improved the performance and included in our previous releases and the current schedule doesn’t have the mentioned performance issue.  Please find our release notes to know about the issue fixes and feature by referring the following link. 
 
Let us know whether this helps also if you need any further assistance on this. 

Regards, 
Arulraj A 


Loader.
Up arrow icon