When using DataVectorWithAlloc, call reserve on it before filling in order to minimize wasted memory.