[3.9] Reduce memory usage