ENH introduce batch_size for grouping short tasks