Improved loading of the TPS file by allocating all memory in advance.