Month View poor performance and showing dates of previous month for a few seconds

I'm using the SfSchedule control in a Xamarin.Android app (no Xamarin.Forms!). I'm loading the appointments by a REST API from our server in VisibleDatesChanged and ScheduleViewChanged, based on the visible dates, and then convert them to ScheduleAppointments and set the new appointments collection by using:

SfSchedule.Appointments = appointments;
SfSchedule.UpdateSchedule();

1. Is that correct?

2. If I swipe from month to month, it takes a couple of seconds (even if I do everything async or in thread pool/delayed), and for those few seconds, the control always shows the exact same day numbers as in the previously displayed month, and then automagically changes all of them at once to the correct ones for the new selected month (you don't even have to swipe, just by sliding the next/previous month in slowly, you can already see the wrong numbers).

3. If I don't load any appointments at all, the day numbers seem to be correct, although (some of) the dates (mostly the top row, if there are 1 1/2 rows of days from the previous month) are not drawn disabled/gray, which otherwise is the case.

4. Also is it correct that I have to set FirstDayOfWeek to (int)DayOfWeek.Tuesday in order to achieve Monday as first day of the week?

UPDATE: seems that calling UpdateSchedule() is causing some of the problems. After I removed it, it's better (though still not perfect), but I don't understand why?

Also a new problem has arisen:

5. If I have two appointments at the same time, one is not shown in day view, and in week view, the second one is shown at the correct time, but in the next day (i.e. instead of both at 11/7/2017 12pm, one is shown at 11/7/2017 12pm, and the other at 11/8/2017 12pm)...

5 Replies

SG Swathi Gopal Syncfusion Team November 8, 2017 11:37 AM UTC

Hi Olaf, 
  
Thank you for contacting Syncfusion support. 
  
We have created a simple sample in Xamarin.Android, with adding more than 100 appointments per month and setting those Appointments in VisibleDatesChanged event. We are unable to reproduce the performance issue while swiping in our latest version (15.3.0.33). We have already improved performance of SfSchedule in Xamarin Forms and this fix will be included in our upcoming Volume 4 main release which is expected to be available by this week.  
  
Sample link:  ScheduleApplication
 
  
In the meantime, if you mention any specific scenarios along with the version used by modifying the provided sample with more information about your requirement, we will ensure your specific scenario as well and provide you the solution. 
  
Query 1: 
UpdateSchedule method should not be used in the sample. If used, the view gets recreated and appointments, style (if any) get reupdated again which causes lag in the performance. 
  
Query 2: 
We are unable to reproduce the issue with month view displays same numbers as in current month when swiped/slided to next or previous views. 
  
Query 3: 
We are unable to reproduce the issue with previous and next month dates are not differentiated from the current month in the month view. 
  
Query 4: 
SfSchedule control will be rendered with Sunday as the first day of the week corresponding value as 1. But according to DayOfWeek enum, respective value of Sunday is 0. 
  
In order to achieve Monday as FirstDayOfWeek, you can set the code as below, 
  
[c#] 
  
            schedule.FirstDayOfWeek = 2;
        (or)
            schedule.FirstDayOfWeek = Calendar.Monday;
 
  
  
You can also refer our online user guide documentation regarding first day of week from the below link, 
  
  
  
Query 5: 
We are unable to reproduce the issue with when two appointments added in same time, one is not shown in day view and in week view second appointment in not show in correct date. 
  
If the provided solution doesn’t meet your requirement, please revert us by modifying the provided sample with more information about your requirement, so that we could analyze on it and provide you a solution.  
  
Regards,
Swathi G
 



OB Olaf Bartelt November 8, 2017 01:24 PM UTC

Hi Swathi,

thanks for the answer!

Query 1: ok, as noted, that fixes some of the problems.

Query 2: that seems to only happen if you call UpdateSchedule from the VisibleDatesChanged handler, etc.

Query 3: I still have that, for example if I switch from day to month view. In the current (and even next) month, some/all of the days of the previous month are displayed in black and not gray. After swiping further (and back), everything seems to work fine. Maybe something with switching the view style? I only set the ScheduleView property, is that correct?

Query 4: ok, thanks for the info!

Query 5: unfortunately, that problem remains. I have two appointments, one from 12 pm to 5 pm, and one from 12 pm to 12:30 pm. In day view, only the longer one is shown, in week view, the shorter one is shown one day later (to the right, as if it's trying to show both appointment side-by-side, but has the cell width wrong or something). In other cases, it works fine though, though there I've noticed that both were longer appointments. Maybe try it with the exact same times I listed above? Otherwise I'd have to try to get it "working" in a sample...

Sincerely,
Olaf


SG Swathi Gopal Syncfusion Team November 9, 2017 07:48 PM UTC

Hi Olaf,

Thanks for the update.

Regarding Query 3: Previous/next month dates not differentiated from current month

We are unable to reproduce the issue with previous and next month dates are not differentiated from the current month in the month view. Could you please confirm us the following details?

# Schedule dll version used.
# Device name, os and configuration details.
# Month in which issue reproduced.

Kindly find the screenshots of current previous and next month view attached, 

Screenshots: MonthView_images

Could you share an issue reproducing sample along with the above details, so that we could analyze and provide you a better solution.

Regarding Query 5: Appointments of same day not rendered properly

We have prepared a simple sample in latest assembly version (15.3.0.33) with schedule appointments with the time ranges (12pm – 5pm and 12pm – 12:30pm) as mentioned by you. We are unable to reproduce the issue with when two appointments added in same time, one is not shown in day view and in week view second appointment in not show in correct date. Attached screenshots for the same.

Sample link:  Schedule_Appointments

Could you please check with the provided sample and screenshots also confirm us the version you are using with schedule? Also please revert us by modifying the provided sample with more information about your requirement, so that we could analyze on it and provide you a solution.

Regards,
Swathi G 



OB Olaf Bartelt December 14, 2017 12:29 PM UTC

Hi Swathi,

sorry for the delay, but I had other projects to attend to.

I have upgraded the controls to the latest version, but the problems persist.

1. The time it takes to display/fill the individual views with the appointments is really poor. After my code has identified the 254 appointments for December, for example, it takes 4 more seconds, until the dots appear in the month view. That is on a Huwaei P10, so no slow device.

2. The problem with appointments not being displayed (correctly) remains. I could narrow it down further. If I have more than 2 overlapping appointments, sometimes appointments are not shown at all in day view and are shown on the next day in week view (like the control is making up another column which overlaps with the next day, if you understand, what I mean).

3. Swiping to the next/previous day/week/month isn't exactly smooth as well.

4. When I'm in day view (at 4 p.m. for example), and I swipe to the next day, the time rulers don't match (the next day is always at around 8 a.m., which is not what a customer would expect, I believe).

Best regards,
Olaf


SG Swathi Gopal Syncfusion Team December 15, 2017 09:42 AM UTC

Hi Olaf, 

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

Regards, 
Swathi G 


Loader.
Up arrow icon