memory optimization for trestles