I have some AWS Lambda functions that perform database CRUD operations. I have about 20 persistent classes. My application is Spring-based and uses Hibernate for the ORM.
With 1536MB allocated, my function takes about 16 seconds to run from cold start. According to the logs, most of this time is Hibernate parsing my hbm.xml files, building LoadPlans, and generally processing metadata.
Since a response time of 16 seconds is far too much, I need ways to speed this up. Is there a way to defer Hibernate's metadata parsing or to do it at compile time?
I've taken a look at the JPA metamodel generator, but that seems to be made for building queries at run-time.