Improve CaTSA

Preallocate memory for CaTSA generation