make the get_next_occurences of event fast