Put more efficient implementation of get_objects() method depending on either prefetch_all method been used or not.