Jump to content

Calendar


CalendarOfUpdates

Recommended Posts

Can you please optimize some of the database queries in the calendar. If you have an active calendar, those select * queries can really cause the month view to load very slowly. We don't really need all the event content for calendarShowMonth or calendarShowWeek and neither do the mini calendars. Cutting out the event content on my calendar cut load times down down to just 1.5 seconds to render the monthview from 10 seconds it took before optimizing.

Thanks.

Link to comment
Share on other sites

It probably is not a major problem for most sites. I have thirty to forty events posted to the calendar each day so the calendarGetEventsSQL is pulling ~900 rows by the end of the month and the calendar is the most viewed page on my site. Add the mini calendar pulling the 900 events from the previous month... you can see how that could choke the server.

The only time you need all the data in the table is when you are showing the full day.

Link to comment
Share on other sites


You indicated you had already made custom changes that helped your site. If you'd like to share them with me I'd be happy to take a look. :)



Ahh, sorry about that. I disabled the mini calendars in calendarShowMonth and added a function quickCalendarGetEventsSQL that is the same thing as calendarGetEventsSQL except the selects are changed

'select' => "event_id, event_title, event_perms, event_private, event_approved, event_unixstamp, event_recurring, event_tz, event_timeset, event_unix_from, event_unix_to",


In calendarShowWeek and getMonthEvents I changed to use quickCalendarGetEventsSQL instead of calendarGetEventsSQL

I am sure there is probably a more elegant way of doing it, but I was trying out ideas on the fly.

Link to comment
Share on other sites

  • 2 weeks later...

The only time you need all the data in the table is when you are showing the full day.




I just looked at calendarofupdates.com and see that you have some calender entries in your calendar there, that allow you to have comments. Can you please tell me how you do this? Maybe I missed something very obvious here, but it would help - a start with what I would like to do with Calendar events and rsvp, etc

Thanks
Link to comment
Share on other sites


I just looked at calendarofupdates.com and see that you have some calender entries in your calendar there, that allow you to have comments. Can you please tell me how you do this? Maybe I missed something very obvious here, but it would help - a start with what I would like to do with Calendar events and rsvp, etc



Thanks



That is a custom module I made and added to the calendar app. The way 3.0 is written allows you to add modules to just about any app to extend it's functionality. You can even add modules directly to the core app. It is pretty cool the way IPS wrote IP.Board.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...