search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Calendar Memory Leak?

Asked by Phil Stratford
12 years ago.
I've created a fairly simple page which just displays one calendar day with seven resource columns. There are probably an average of five events per resource, so there are roughly 35 events for the whole day. Nothing to heavy. This is just a static page, being displayed on a large screen in a corridor. Nobody interacts with it in any way, it's just for display. And the page refreshes every five minutes. The computer running it is pretty low-end, with only 765MB RAM (the computer is actually built-in to the screen, it's a Samsung digital signage display). Unfortunately, the calendar on the page takes a long time to render. The first time it loads it takes about 10 seconds. And the render time gets longer and longer with each page refresh, until very quickly it's taking over a minute to refresh. Eventually it gets to the point where it hasn't rendered before the page refreshes and it's stuck in a loop where the calendar never displays. At the same time the memory usage of the computer steadily rises with each refresh, from very low to 100% in under half an hour. Is this a memory leak in DayPilot Calendar? My code for the page is so basic that I can't see that anything I've written would be causing he problem. Any help would be greatly appreciated as my organisation has spent quite a lot of money on this screen just to display this calendar information and at the moment it's not working! Phil
Comment posted by Phil Stratford
12 years ago.
I should also add that I've tried removing any fancy graphics from the calendar, such as the gradiated backgrounds on events, I've tried reducing the number of resources to just one and I've tried removing what very little code there is in the 'BeforeEventRender' event of the calendar to see if I can deduce where the performance hit is coming from, but nothing seems to make any difference.
Comment posted by Dan Letecky
12 years ago.

The Calendar may leak memory if you put it inside an UpdatePanel and refresh the UpdatePanel too many times.

Two things could be done:

  1. The Scheduler has an AutoRefresh feature which uses the internal callback mechanism to refresh the event set (much faster than using UpdatePanel which redraws the whole control). It seems this feature would be helpful for the Calendar as well.
  2. The memory leak can be fixed be implementing the .dispose() interface. This is already done in the Scheduler too.

I will try to implement both as soon as possible. However, I can't promise any date at this moment.

Comment posted by ATR University of Michigan
11 years ago.

Any news on when this issue will be addressed?

I have a page containing the navigator, calendar and month controls that refreshes itself at regular intervals and users are likely to leave it open all day. The DRIP tool shows memory leaks and continuously increasing memory use. This could end up being a showstopper for us.

DRIP also shows the memory leak for the Day Pilot demo page http://www.daypilot.org/demo/Calendar/

Thanks

Comment posted by Dan Letecky
11 years ago.

As of build 6.2.2135 (see the sandbox), the Calendar shouldn't leak anything (on page unload, postback, partial postback, full and partial callback update), at least not anything detectable by drip.

By the way, drip is a bit old tool and I'm not sure if all the issues it reports are actual leaks (at least in IE8). Take this example:

var element = document.createElement("div");

If you don't add the element to the DOM, it is reported as a leak.

Anyway, I have addressed all the issues it reported and it seems that the memory consumption is no longer growing on repeated refresh.

The 6.2 release will include the autorefresh feature, just like the Scheduler.

Comment posted by ATR at Univ of MI
11 years ago.

Thanks, I believe the memory issues have been resolved. We've been testing with the new build and I've had no reports of problems.

Comment posted by Zak
10 years ago.

Calendar V6.5 Autorefresh does NOT WORK.
I am using version 6.5 of the Calendar with the AutoRefresh option. The refresh STOPS working when I call amodal popup from the calender. This is provider example code for the calendar. So the autorefresh has fixed the memory leakage but does NOT continue to refresh the Calendar display. Any chance of a fix. I am going to use the timer with the update panel for my demo to new customer (even though it causes the memory leak). Hoping you will offer a fix soon so I can use the calendar in real world application.

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.