Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsEventsEventsSlow performance?Slow performance?
Previous
 
Next
New Post
8/28/2007 1:25 AM
 

I've been using the Events module for a while now, but recently I noticed really bad performance. I tracked it down to the events module as I removed each module 1 at a time.  Then moved the events module to another page and if I hit that page, it causes my server's CPU to peg at 100% for 1-2 minutes!  The w3wp.exe process is doing this, so my SQL backend doesn't appear to be the bottleneck.

Without cracking open a debugger, does anyone have any ideas if/how I can fix it?

 
New Post
8/28/2007 11:30 AM
 

I cracked open a debugger anyways and determined that the code to add a recurring event is the culprit.  Essentially it does a really slow while loop.  This loop can take 5-10 seconds per event.  If you have 10-20 recurring events, the performance gets horrible fast.  This has made me stop using the events module entirely.

 
New Post
8/28/2007 1:23 PM
 

Are you using a lot of recurring events (more than 10 or so) with recurrence end dates that lie far ahead in the future (in the year 2050 or so)? I had that on my site without problems using Events 3.2, but as I upgraded to 3.3.8, it took 2-3 minutes to load the page. I had to set the end dates back to the year 2009 to make the page load in an acceptable time.

 
New Post
8/29/2007 10:21 AM
 

In the existing Events module recurrence is one of many features and the assumption is that most Events are not recurring. This is not a criticism of the Events module, it is a fantastic module that works great for most people.

Like you I was having problems. I needed a DNN appointment calendar that could handle 1000's of recurring appointments.

The cause for the performance problems is that the Events module guesses on what records to grab. But not only can the guesses miss valid events, it has to work extra hard to weed out all the wrong guesses.

For example: The list view always processes more than a years worth of events to show the next few Events. It doesn't know in advance what Events might reoccur so it retrieves all Events for the next year. In a busy calendar thousands of records are retrieved then each one is checked for recurrence. Unfortunately if your recurring Event starts before the listing date it is very possible that it will be completely missed and not shown.

I ended up doing total rewrite of recurrence and the way Events are stored and retrieved.

Here is a post I wrote last year describing the changes.

---------------------------------------------------

I have a classic ASP intranet that has been in operation and evolving over the last 7 years. The calendar application sees heavy usage and contains hundreds of thousands of records.

I mentioned recurring events in a previous post so let me start there. Originally I stored recurring events as single record as I believe the DNN Events module does. Even though it may seem counter-intuitive I increased performance by splitting and storing the recurring record as many single events. Here's why.

The event is entered once but viewed hundreds of times. The idea is to optimize the data for viewing at the expense of storing more data (more about data structure later). With a single recurring record you have to cast a wide net to make sure have all the data. To view a date the required statement "SELECT * FROM Events WHERE @EventDate BETWEEN EventDateBegin AND EventDateEnd" will return lots of unnecessary records. In addition the recurring records will need to be evaluated to see if they fall on that date.

If you split recurring events at the time of entry to view a date the statement becomes "SELECT * FROM Events WHERE @EventDate = EventDate". It grabs exactly records needed with no recurring evaluation needed.

I have used two different data structures for storing the split recurring events.
In the first one the Events table remains as is and a second "EventDates" table is added containing:

ModuleID
EventID
EventDate

If a recurring event occurs over ten days then ten entries are made into this table one for each day. Normal non-recurring event dates are also added into this table. All date searches are then done against this table.

My users were not happy with the above method because all recurring events were still tied to a single record. If you change one you change them all.  For example if they had a recurring record that states there will be a meeting the first Tuesday of every month for the next two years. They wanted to change JUST next months event to say "Cancelled". 

I accomplished this by adding a ParentEventID field to my Events table. When editing a recurring event a check box would ask them if they wanted to change just this date. If checked a new (non-recurring) event would be created and the original recurring EventID would be put in the ParentEventID field. Any changes to the original recurring event can now be propagated to the new event via the ParentEventID field.

For example: "DELETE FROM Events WHERE EventID = @EventID OR ParentEventID = @EventID"

 
New Post
8/29/2007 1:40 PM
 

Possible Solutions for recurrence issues?  Here's the criteria:

1) Must handle All types of imported/exported events from other sources (Outlook, Mac, iCalendar, Google)
2) Must be fast but minimally handle recurrence patterns exxpressed in RFC 2445
3) Needs to be performant (handle possibly hundreds of recurring events).

Simple...  Actually, I have yet to find a reliable implementation that can be integrated into the module.   If you have one,  please share!

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsEventsEventsSlow performance?Slow performance?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out