Improved efficiency of the all method on Dao