Speed up filtering and add a timer