I know there's a warning to this effect in the doc, but:
Code:
// add base classes
cfg
.addClass(Channel.class)
.addClass(Item.class)
.addClass(ItemGuid.class)
.addClass(ItemEnclosure.class)
.addClass(ItemSource.class)
.addClass(Cloud.class)
.addClass(Category.class)
.addClass(ChannelGroup.class)
.addClass(ChannelSubscription.class)
.addClass(Image.class)
.addClass(ItemMetadata.class)
.addClass(TextInput.class);
// get session factory
sessions = cfg.buildSessionFactory();
Is verry slow (takes 5-10 seconds on a speedy machine.)
1) Are there any techniques for speeding this up, like precomputing whatever is being built by addClass() and/or buildSessionFacory()
2) I am writing a client app, where a 5-10 second delay at startup is a real problem. I am doing it in bacground already but still there is some state that's coming out of the database that is needed to propertly draw the screen.
Thanks.