johm
johm copied to clipboard
avoid to parse classes and work on model at runtime
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.
good idea :-)