hibernate to minimize memory useage