Oooow. Interesting one. So the events can be on different schedules / frequencies? It sounds like something you should be able to do with a single sql query. Could you provide a bit more info?
Hmm, currently it uses python-dateutil to find recurring dates. I chose django-schedule at the time as it seemed the best choice, which is built upon it.
I'm not certain postgres for example has that kind of functionality around dates. Googling, I found this though:
Just thinking that maybe you had a single core lookup that you needed to optimise. A slow running "find all events that repeat on today." If it's something that's more deeply scattered through the system then it might not be worth attacking.
If you just needed the events for today you should be able to do something simpler. Depends on the complexity of the frequency controls. But imagine weekly recurring - you should be able to do something like "(today - start day) mod 7 == 0" to find all weekly events that hit today. You could then construct a similar rule for each different frequency:
-- not real code!
select * from event where
(frequency = 'daily')
or (frequency = 'weekly' and (today - starts) % 7 == 0)
or (frequency = 'monthly' and day(today) == day(starts))
or (frequency = ...)