Help solving php calendar thingy

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I set up this calendar where people can subscribe with ical. They
subscribe to a php file(instead of ics) and it dynamically loads the
calendar from the database. something like this has to be done because
each user chooses which kind of events they want to appear in ical.

I'm about to have more users and more types of events. It seems like
it would majorly bog down my server to have lots of people's icals
updating every 5 minutes.

lets say there are 4000 users and 4000 types of events.  One user
might only want 200 of those event types to show up in his calendar
while another user might only be interested in one of those types of


idea 1 = each user gets their own static ics file. as the calendar is
updated, the update page changes every user's file who has requested
the recently added event type.

idea 2 = do the same thing, but with crons

someone's gotta know a good way to do this. Do you guys have any ideas?

Re: Help solving php calendar thingy

On Jul 6, 12:36 pm, wrote:
Quoted text here. Click to load it

How idea 3: do neither.  You said "It seems like it would majorly bog
down my server" which suggests to me that you have no evidence that it
will, in fact, slow down.  Have you done any sort of load testing?  Do
you already have all these users or do you think you might in the
future?  Do you have any benchmarks to compare things to?

I'm not trying to be mean or rude -- but I see way too many people ask
questions in this group in an attempt to optimize something before
they need to.  Google around for "premature optimization" and see what
you come up with.  Often people will optimize something only to find
that the problem is actually something totally different.  Until you
actually run into a performance problem I'd suggest coding for
readability and maintainability.

Re: Help solving php calendar thingy

that's a terrific reply.  Thanks.

Site Timeline