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
Contributor
venquet
Posts: 14
Registered: ‎08-21-2011
My Device: Bold
My Carrier: Airtel
Accepted Solution

Blackberry XMPP messages

 

Made an Blackberry application with XMPP backed for receiving real-time messages for the users, expected to give a feel like push message to the top business users for some key events happens in desktop ERP system by the endusers.

Ok let me go to my doubt..

  1. Sockettimeout, max is 2 mins..handled by listening for the connection failure and getting reconnected..will this cause high CPU usage?
  2. Listening for xmpp messages with idling socket connection...will this cause high CPU usage..in-turn high battery consumption and any performance degradation..
  3. Do we have any tool to identify the CPU and battery consumption by the APP on device or simulator?

Please help me out...

Please use plain text.
Developer
Hithredin
Posts: 404
Registered: ‎06-03-2010
My Device: Z10 Red
My Carrier: Free

Re: Blackberry XMPP messages

1) I've never had a connection timeout that caused a high consumption of CPU 

 

2) Will your connection stay opened permanently? This will cause high consumption since the 3G will have to stay opened. 

 

3)Since OS 6 you can use Option > Application and select you're own app to monitor it's CPU, RAM, ROM actual values and total for last day or hour.

 

 

Please use plain text.
Contributor
venquet
Posts: 14
Registered: ‎08-21-2011
My Device: Bold
My Carrier: Airtel

Re: Blackberry XMPP messages

On the point #2 : Yes, connection will listen for inputstream for XMPP xml stanzas. I cant get your point on consumption of 3G, you mean data consumption or CPU consumption. Please advise.

 

 

Please use plain text.
Developer
Hithredin
Posts: 404
Registered: ‎06-03-2010
My Device: Z10 Red
My Carrier: Free

Re: Blackberry XMPP messages

About the consumption I was talking about the energy to maintain the 3g/wifi active, even with no data exchanged.

Please use plain text.
Contributor
venquet
Posts: 14
Registered: ‎08-21-2011
My Device: Bold
My Carrier: Airtel

Re: Blackberry XMPP messages

Oh got it, you mean keep 3g service active/on battery consumption will be increased right? I also check meebo's IM apps for Blackberry they are also exchanging http messages over the 3g/wifi.

 

Anyhow thanks for your suggestion, let me measure the battery consumption with and without the application running.

 

 

Please use plain text.
Contributor
venquet
Posts: 14
Registered: ‎08-21-2011
My Device: Bold
My Carrier: Airtel

Re: Blackberry XMPP messages

Finally I am able to get some clue of CPU usage of my app through BB Simulator ported on 6.0 OS, clearly its show the CPU usage during the application activities.


In OS 6.0 you can findout this option under Options -> Device -> Application Management.


1. During idling socket connection 0% CPU consumption.

2. When a message arrives through XMPP socket consumption goes upto less than 1 to 1% CPU.

3. While reconnection after socket timeout consumption takes standard of 7% CPU.

 

On the average very less consumption, hope my apps wont drain my customers batter :smileyhappy:.

 

Hope this detail will help others in the app performance point of view.

Please use plain text.