johm icon indicating copy to clipboard operation
johm copied to clipboard

avoid to parse classes and work on model at runtime

Open rmannibucau opened this issue 12 years ago • 1 comments

Using reflection to parse models and to check it at runtime is a clear bottleneck since this model (Class<?>, Field ....) doesn't change at runtime.

Moreover looping over all field to get the id (one example) is a bad design too.

Adding a method JOhm.register(Class<?>) to do all this stuff and simply set values @ runtime can be a great enhancement for next versions from a performance point of view.

Note: that's the reason why in all Java ORM like JPA for instance the entitymanagerfactory is created only once by application.

rmannibucau avatar Jun 28 '12 09:06 rmannibucau

good idea :-)

jasonhu avatar Oct 18 '12 13:10 jasonhu