Optimize memory usage of TextPool