[Cosmo-dev] hibernate prototype

Brian Moseley bcm at osafoundation.org
Tue Aug 15 12:35:30 PDT 2006


On 8/15/06, rletness at simdeskcorp.com <rletness at simdeskcorp.com> wrote:

> Yeah I saw that.  One way to solve this is to just not allow recurring
> events
> that go past a certain number of recurrences.  What percentage of events
> are infinitely recurring??  It has to be very small.

well, looking at my personal calendar, i've got:

 * two events that repeat every other thursday with no end date
 * one event that repeats every m,w,th,f,sun with no end date
 * one event that repeats every m,t,th,f that ends after six weeks
 * one event that repeats every t,th with no end date

so i don't think it's as small as you might hope :)

> The other idea I
> had was
> instead of indexing time ranges, just compute a start and end date (could be
> infinity) based on the recurrence rules.  This range would be computed and
> indexed at creation time.  This means a database query gets a superset of
> the events you are interested in.  Recurring events returned as part of a
> time-range query would be passed through some business logic to filter out
> events that don't  have a recurrence in the timerange.  This works for
> simple
> time ranges,  but when you have nested timeranges, like you can in a caldav
> calendar filter, it gets complicated.

yeah, this is essentially re-expanding the event on every query. my
instinct is that it's the wrong approach, but i'm willing to be proven
wrong.

> Because infinitely recurring events are such a small percentage of events
> it would suck to have to implement such complicated logic just for that.

unfortunately i think it's a pretty common use case :/


More information about the cosmo-dev mailing list