Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Calendar
  New Posts New Posts RSS Feed - Performance issue with big event count
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Performance issue with big event count

 Post Reply Post Reply
Author
Message
Marco1 View Drop Down
Senior Member
Senior Member


Joined: 16 January 2004
Location: Germany
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marco1 Quote  Post ReplyReply Direct Link To This Post Topic: Performance issue with big event count
    Posted: 18 January 2010 at 5:20am
It seems that there is a significant performance loss, when handling many events, say 1000 and up.
Vertical calendar scrolling gets extremly slow and inresponsive, especially on my older PCs and in Debug version.

Test case:
In CalendarDemo I added the following code in CCalendarDemoDoc::AddTestEvents().
It adds 15 events per day, starting at 6:00am, repeated for last 3000 days.

  // add test events
  COleDateTime dtNow(COleDateTime::GetCurrentTime() + spTimeShift);
  COleDateTimeSpan spDay(1, 0, 0, 0);
  COleDateTimeSpan sp15min(0, 0, 15, 0);
  COleDateTimeSpan spHour(0, 1, 0, 0);

  // NEW -------------- add a few thousand events
  COleDateTime dtInit;
  dtInit.SetDateTime(COleDateTime::GetCurrentTime().GetYear(), COleDateTime::GetCurrentTime().GetMonth(), COleDateTime::GetCurrentTime().GetDay(), 6, 0, 0);
  for (int d = 0; d < 3000; d++) {
    COleDateTimeSpan spD(-d, 0, 0, 0);
    for (int h = 0; h < 15; h++) {
      COleDateTimeSpan spH(0, h, 0, 0);

      CXTPCalendarEventPtr ptrEvent = NewEvent(pCalendarData, dtInit + spD + spH, dtInit + spD + spH + spHour, _T("Test event"), _T("New Location"), nScheduleID);
      ptrEvent->SetBusyStatus(xtpCalendarBusyStatusTentative);   
      if (!pCalendarData->AddEvent(ptrEvent)) {
        ASSERT(FALSE);
        return;
      }
    }
  }
  // END -------------------------------


Set the time scale from 2:00 to 23:00 and switch to Work Week view.


Mark, can you please check if you get this performance loss, too and what's its cause?

Thanx, Marco

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 29 January 2010 at 3:14pm
I repeat your case - it was very long LOAD time but I don't see performance problem with vertical bar scrolling and with respond
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.