optimize loader performance