To display events from many courses, the loop in calendar_set_filters() (calendar/lib,php) does some really stupid stuff like doing a get_record for every course and a get_context_instance as well.
This manifests on default sites that use the calendar block or upcoming events on the home page.