TextArea memory usage optimization