Shouldn't it then do a loop a maximum of maxSize/10 +1 ?  That way you always get the least number of requests possible and you only have to do the +1 if your maxSize %10 != 0 right?