Compute the maximal chunk size only once.