Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Trusted Contributor
Posts: 121
Registered: ‎01-19-2011
My Device: Not Specified
My Carrier: engineer

performance issue, daemon

i am doing a chat app and i have a problem with the performance when i store data in my sqlite db but i read that i can manage this with a daemon process or thread i don't sure if there are a difference or if the same, well someone can give me a guide about how manage background process when i can store in sqlite  and how access data of this process with my gui app

thanks

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: performance issue, daemon

I guess the first question should be to find out why you are using SQL to save this data?  I would have thought that persistent store would have been easier to use and is much faster. 

Developer
Posts: 141
Registered: ‎07-13-2011
My Device: BB Bold
My Carrier: Vodafone

Re: performance issue, daemon

We have used a lot of SQLIte in our applications and I have always followed this guide..

This may help you as well.

 

http://docs.blackberry.com/en/developers/deliverables/8682/BP_Optimizing_SQLite_database_performance...

Trusted Contributor
Posts: 121
Registered: ‎01-19-2011
My Device: Not Specified
My Carrier: engineer

Re: performance issue, daemon

my problem start when i recieved a new message in my chat app so i save this message and show this but what happen when i recieved 10 messages in the same time this is the problem because i have 10 current inserts in my db in same time Smiley Frustrated, so do you have any idea about how handle this inserts

Developer
Posts: 467
Registered: ‎07-16-2009
My Device: Z10 LE
My Carrier: Vodafone NL

Re: performance issue, daemon

Guys,

 

don't lose you time with database. It hangs app and device on some old oses (you could simply comment db calls and see that app and device works without issues) even if it started in separate thread.

 

You could use some file based databases or just save data in clever way in persistent store.

 

What is the name of app?

 

Thanks,

Eugen

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: performance issue, daemon

I agree with Eugen, from a performance and functionality perspective, you can use other things to SQL.

 

If you really must use SQL, then I think that you would be able to use the database, but you should create a single database update Thread, and supply the updates to that Thread. 

Highlighted
Developer
Posts: 467
Registered: ‎07-16-2009
My Device: Z10 LE
My Carrier: Vodafone NL

Re: performance issue, daemon

Smiley Happy

 

Simon, I had this pain in the past. The separate thread doesn't help. It's unbeliveable but it's the truth.

 

Smiley Happy