I’m looking for advice on the best way to populate a calendar.
Currently, I can think of two ways to do it:
Loop through each day on my calendar and request all items for that
day from the database in each iteration…which would be thirty or so
db queries per page load.
** this way is obviously quite db heavy
Make one request for all events in the month and then loop through
each day on my calendar and then loop through all my results to find a
** this way is quite ruby / processing heavy
Which is better?