Make Example.filter_categories much faster