excessive memory usage when definition variables vary substantially