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
Developer
Posts: 27
Registered: ‎04-10-2009
My Device: Not Specified

First time app runs is EXTREMELY SLOOOOOW

We have developed a number of java based apps for BB devices - with varying degrees of success.

 

Our latest effort amplified a previous observation.  Specifically it seems that when I download the application to the device, it asks me some question regarding 'trusting' this app - to which we invariably answer 'yes'.

 

Once doing so it takes a LOOOOOOOOOOOOONG time for the actual application to run - the first time.  All subsequent times - it starts up fine.

 

My questions are as follows:

 

1.  This LOOOONG start time...is that at all related to the question about 'trust'?

2.  During the LOOOOONG start time, the device is pretty much unresponsive.  It's clearly busy doing something - and every now and then the UI thread gets a slice of time.  What is it doing?

3.  Why does this only occur the first time?

4.  Is there anything that can be done to eliminate or reduce this time?

 

Even worse, on some phones, this process never completes.  The phone essentially freezes you can wait until the battery completely drains.

 

Things of note:

 

1.  All apps are developed against OS5.

2.  Works fine (if you call 3 minutes to start first time) on Bold runningOS5.0.0.411 - but essentially freezes OS 5.0.0.681

3.  Works fine on Storm os 5.0.0.328

4.  Essentially freezes on Curve running os v5.0.461

5.  THe app is about 4 MB in size - most of which is an embedded database.

 

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: First time app runs is EXTREMELY SLOOOOOW

I've never seen this issue with our apps.

 

What processing does your app perform during "first time" startup?

 

For example, are you are processing your "embedded database" somehow (like adding data to persistent store)?

 

 

 

 

 

Highlighted
Developer
Posts: 73
Registered: ‎10-23-2009
My Device: Not Specified

Re: First time app runs is EXTREMELY SLOOOOOW

I see exactly the same behaviour with my own application (about 1 MB, mostly button images used in the app)  I thought it was related to the alternate starting point definition in the new Eclipse JDE Plugin. (In my app the alternate starting point simply assigns a graphic (with rollover) to the BB Homepage item for the app.)  In my case it takes 60 seconds to start the first time, but doesn't crash any devices we've tested though.

Developer
Posts: 140
Registered: ‎02-08-2010
My Device: Torch 9800, Storm 9530, Curve 8330
My Carrier: AT&T, Verizon

Re: First time app runs is EXTREMELY SLOOOOOW

[ Edited ]

Have seen something similar when wrote an app for multiple OS versions using the library method as described in the knowledge base.  Entire phone was slow as molasses until reset after install, and then everything was quick.  Went back to separate distros for different OS's and it never happened again.

 

 

Developer
Posts: 1,746
Registered: ‎04-08-2010
My Device: Passport Silver, PRIV
My Carrier: Telekom.de, O2, Vodafone

Re: First time app runs is EXTREMELY SLOOOOOW

noticed the same from time to time after installing apps with libraries

 

if after installation one time resetting the device the apps always are running fast

 

so my customers getting the hint to reset after installation

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development native Mobile Business Apps
BlackBerry 10 | Qt Mobile (Android, iOS)
Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org
mobile-development: http://appbus.org Twitter: @ekkescorner
Developer
Posts: 27
Registered: ‎04-10-2009
My Device: Not Specified

Re: First time app runs is EXTREMELY SLOOOOOW

Well here's something new and exciting to add to the mix:

 

On the device where the app had previously run (albeit after a 3 minute wait on launch), installing a new version of the app caused it to permanently go comatose (like some of the other devices).

 

I had removed the contents of the pre-packaged database - brining the size of the load down to 1MB.  I thought this would help the situation - not make it worse!

 

I many times tried to remove, install and run the new version.  Each time on clicking on the launch icon the handset would freeze (curiously, the ALT and CAPS indicators still worked - but other than that;..nothing).

 

Yes - I tried soft reset/hard reset...all to no avail...UNTIL

 

I went to settings->Security Options->Wipe and wiped the device clean.

 

After that, the application installed and launched - albeit with that delay at startup.  However, the delay was MUCH less than before.  On the order of 5 seconds - rather than 3 minutes.  I'm guessing that's because of the reduced size of my build however.

 

Serious folks:  Does anyone really, really believe the BB is a viable platform for application development?  The whole thing feels like a poorly executed grad project in university.

 

Does anyone from RIM have anything intelligent to add to this conversation?

Developer
Posts: 140
Registered: ‎02-08-2010
My Device: Torch 9800, Storm 9530, Curve 8330
My Carrier: AT&T, Verizon

Re: First time app runs is EXTREMELY SLOOOOOW

[ Edited ]

Make sure there are no duplicate package names or class names in different COD files.  Also make sure your package names are unique, i.e. company.project.class.  I've seen something like what you're seeing when I had a duplicate somewhere, maybe it was in a library.

 

Suspect the other problem was related to the phone getting its databases reorganized after installing.  Everything worked, but slowly, like a system might behave when having to search for symbols that are missing from indexes.