Skip to main content

Why is the WTK emulator so slow?

3 replies [Last post]
flexy
Offline
Joined: 2008-11-27
Points: 0

I'm developing a JavaME application that does some amount of image processing and the emulator is just intolerably slow. It's much more convenient to deploy the app onto my E90 for testing than wait for the emulator to run the app, which defeats the purpose of having the emulator in the first place.

I have tried to change the emulator settings, enabling and disabling the VM speed emulation to no avail. Also, the emulator just dies right away, if I try to run the app with the 'Run MIDP Application ...' tool, but runs when launched from NetBeans.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tbrandalik
Offline
Joined: 2005-05-12
Points: 0

I suppose you are using wtk 2.5.2 right? It is possible that device implementation is faster the emulator especialy in imaging where kind of acceleration might be available on device.You don't specify what kind of image processing you are doing and if processing itself is slow or emulator startup is slow.

I can advise to try out new javame-sdk early access with new Vm. Download from http://java.sun.com/javame/downloads/sdk30ea.jsp

Regarding launching emulator. I would advice to start from command line first "emulator.exe -Xdescriptor:
"
Run MIDP app does basically the same thing but without console so output is lost and we can't guess what's going on there.

-Tomas

flexy
Offline
Joined: 2008-11-27
Points: 0

Yes, I'm using WTK 2.5.2. The problem with the emulator startup was because I forgot that my app needs a larger heap (which I'd set in Netbeans) than the default. Unfortunately, the same problem persists with the 3.0 SDK, because its emulator doesn't appear to have a switch for setting the heapsize at all.

Regarding the image processing, I'm processing raw image data stored in plain arrays (doing filtering 'n stuff), so the problem is definitely with the VM speed. I haven't measured, but my rought estimate is that the app takes from 2 to 5 times as long as on E90 to run, taking many minutes longer.

I think I'll try Nokia's emulator next to see if that's any faster.

[Update]
The Nokia emulator is much faster, though the emulator startup time is hideous.

tbrandalik
Offline
Joined: 2005-05-12
Points: 0

Early access has only 3 predefined heap sizes 3, 4 or 5MB. Concept of emulators is a bit different in javame sdk. Properties are set per device. If you run javame sdk ui go to device selector and choose cldc device that you will use and open its properties and switch heap size to 5MB. We will improve heapsize setting to be freely configurable in final release.

-Tomas