no9
8:43 AM
hey there friend
do you have time to help me little with my ormlite?
:)
 
yes mate.
 
no9
i have problems with update
it is slow
 
ask some time I can not an expert
 
no9
is there any general trick?
0
Q: Slow update with OrmLite

no9I have a simple structure and i noticed that updating records in my database takes too long to execute. This is how my data class is defined: public static final String TILE_MAP_UNIQUE_ID_FIELD_NAME = "tileMap_unique_id"; @DatabaseField (uniqueIndexName = "unique_tileMapCache", canBeNull = fal...

 
which version of ormlite are you using
 
no9
8:44 AM
i have posted a question
i have downloaded last week
must be the latest
 
4.23 right
 
no9
yes the included libs say so
ormlite-android-4.23.jar and ormlite-core-4.23.jar
 
okay the latest
 
no9
the line updateTileMapCacheDataDao.update(updateBuilder.prepare()); takes about 2 seconds
it should be way faster
 
Oh I'm sorry no idea ho you update statement is really big
did you tried row sql
 
no9
8:50 AM
not yet, but i will now :)
 
@no9 I think that will help you here not sure
:)
 
no9
this should do it right updateTileMapCacheDataDao.updateRaw(updateBuilder.prepare().toString());
 
not sure but now one think I will say you know more that me. Me never used like this. Only done some simple operations :(
 
no9
just one more question
fif you use the ORM in some non Activity class?
fif=did
hello user
 
@no9 O_o I didn't get you
 
no9
8:59 AM
well
i am using ormlite implementation on some class that does not derive from activity
that means the class does not extend like this
public class MainActivity extends OrmLiteBaseActivity<RDatabaseHelper>
this gives all the orm lite funcionality in the activity like how to get the helper and all the automatic cleaning and stuff
but when you use the ormlite in a non activity class you have to handle all by yourself
database helper is called like this: dbHelper = (RDatabaseHelper) OpenHelperManager.getHelper(context);
but that means that you have to take care after the cleanup yourself somehow
but i cant find any example
 
I need to appreciate you the way you thinking. But no idea for me :(
I think this have a scope for an so question
 
no9
see section 4
this is what i am talking about
but when i try to use release() i get "The method release() from the type OpenHelperManager is deprecated"
oh wait it was renamed to releaseHelper()
 
9:15 AM
I'm not well. Got fever. Now going home. Wish you good luck and inform me once you have solved it :)
 
no9
ok Labeeb, take care and get well !
see you when you get better
thanx for the help
 
ok np :)
 
9:36 AM
@hi all