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
New Developer
Posts: 7
Registered: ‎02-04-2010
My Device: Blackberry Curve
My Carrier: Movistar

Improve Performance?

We wanted to develop audio software for the blackberry, a sequencer application similar to korg-ds 10 or LSDJ (maybe a little more complex). For this we need to write high performance digital signal processing code. This is possible on both IPhone and Android (which provides JNI). So my question is, given that java performance is not enough, how can we get to do this? Is it possible to write under anything faster than Java?

 

Developer
Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Improve Performance?

BlackBerry is Java only, it is not possible to access JNI (unless you talk to RIM).

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Developer
Posts: 709
Registered: ‎09-10-2009
My Device: 8520, 8900, 9000, 9300, 9650, 9700, 9780, 9800, 9810, 9900, 9930
My Carrier: Verizon

Re: Improve Performance?

Side track a bit. Does BlackBerry use a JIT compiler?

Highlighted
New Developer
Posts: 7
Registered: ‎02-04-2010
My Device: Blackberry Curve
My Carrier: Movistar

Re: Improve Performance?

Ah, I see.. seems I'm not lucky with blackberry. Thanks though!

 

Developer
Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Improve Performance?

[ Edited ]

No problem, it's just the way things are right now.

 

@Aviator168:

From what I remember reading on some "undisclosed website" rapc converts the Java bytecode to a semi-ASM/bytecode combo. That way certain functions run faster then if the bytecode was interpreted because it is closer to the CPU. What does this mean? The BlackBerry could be using a JIT compiler but it most likely handles something that could need optimization in rapc and then have the rest interpreted.

 

I could be wrong about the JIT but for (from what I can tell) most of the time a JIT is an add-on to Java and often is not used for embedded devices (like cell phones).

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
New Developer
Posts: 7
Registered: ‎02-04-2010
My Device: Blackberry Curve
My Carrier: Movistar

Re: Improve Performance?

I see. I don't think i've heard of any cellphone using JIT (as it can be a little memory intensive), but JNI would really help to get apps to levels of performance comparable to IPhone or Android. Though i guess given the berry likely doesn't use virtual address spaces (as it's all java), maybe RIM doesn't want to risk affecting the stability of the device...

 

 

Developer
Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Improve Performance?

[ Edited ]

I have a feeling it has more to do with security. With Android and iPhone you can get overflows, invalid memory access, and other security problems that come from unmanaged coding. If it was possible to create the native JNI and send the project to RIM so they can verify it's "safe" I would probably want to do it for some apps.

 

EDIT: Also I the note of performance, to improve performance that is why they you need to do a second compile o a compiled Java application. It creates a semi-native application to speed it up as stated in the previous post.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.