Small perf improvement : filter before sort