Reduce memory usage and improve performance.