I've chosen greenDAO because it's site states that it's one of the fastest ORM systems for android. To my dissapointment it takes it like 40 seconds to insert 600 records on Samsung i9001. I'm not sure if I'm doing anything wrong.
Could you suggest anything to lessen the amount of time it takes to perform those operations ?
generator code:
private static void addNewsArticle(Schema schema) {
Entity article = schema.addEntity("NewsArticle");
article.addIdProperty().autoincrement();
article.addStringProperty("title").notNull();
article.addStringProperty("body").notNull();
article.addStringProperty("shortDescription").notNull();
article.addStringProperty("thumb");
article.addDateProperty("date").notNull();
}
insertions
Date now = Calendar.getInstance().getTime();
for (int i = 0; i < 600; i++) {
NewsArticle testArticle = new NewsArticle();
testArticle.setTitle("title-text" + i);
testArticle.setBody("body-text" + i);
testArticle.setShortDescription("short-text" + i);
testArticle.setDate(now);
newsArticleDao.insert(testArticle);
}