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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
New Developer
steff2632
Posts: 52
Registered: ‎06-07-2011
My Carrier: o2

works in the simulator broken on device.

as per the title written an app which works perfectly on the simulator but freezes on the phone.

 

I'm using wait/notify to halt the UI when loading files and notify is being called when the UI should resume building itself.

 

been on this smae issue for weeks now(almost missed a flight because of it!) need to get it sorted.

 

Any ideas guys

Please use plain text.
New Developer
steff2632
Posts: 52
Registered: ‎06-07-2011
My Carrier: o2

Re: works in the simulator broken on device.

just extra info:

it seams like it's waiting on a notify that never comes, but this should be the case across both shouldn't it. It hasn't crashed or anything like that because another thread that I have is still running and hitting breakpoints
Please use plain text.
New Developer
steff2632
Posts: 52
Registered: ‎06-07-2011
My Carrier: o2

Re: works in the simulator broken on device.

[ Edited ]

turns out its not the wait/notify, its the SQL access which takes much longer on device than with the simulator. I know the simulator is running on an i7 but thought that RIM had implemented some sort of virtulisation that would emulate the speed of the device.

Now my problem is speeding up SQL lookups for 500+ entries possible 20,000 apparently. Now using BufferedCursor 7 just placed index's into the database, anymore ways of speeding up database access? Using OS5.0.

Thanks in advance

Please use plain text.
Developer
simon_hain
Posts: 14,077
Registered: ‎07-29-2008
My Carrier: O2 Germany

Re: works in the simulator broken on device.

use separate threads when running potentially blocking code.
see
http://supportforums.blackberry.com/t5/Java-Development/What-is-the-Event-Thread/ta-p/446865
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.