improve performance for getItemById method in Repository