Skip to main content

Simulator Issues: logging and performance

7 replies [Last post]
breaden
Offline
Joined: 2003-07-16
Points: 0

I tried modifying the CirclesXlet sample to play around with the simulator.
I have two issues:

1. How to enabled logging? I don't see how to enable debug logging output from the xlet.

2. The emulator is _very_ slow. It doesn't seem to be using much cpu resources so I can't imagine why it is so slow. Is it throttled in some way?

As it is now, the simulator is not really useful unless there are some knobs to turn to speed it up and get logging on. Is it intended that you can do any prototyping or testing with this simulator?

Thanks,
Matt

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mmillard
Offline
Joined: 2008-11-05
Points: 0

The JVM for the RI Emulator is the one we modify for the OCAP stack and distribute with the binary (based on PhoneME). It should not be using any other JVM that is installed on the system.

Perhaps the performance issue you are seeing is the time it takes to bring-up the stack, RI Platform and invoke the Xlet. I've seen startup take 10 to 30 seconds; however, once the Xlet is running, it should perform at a reasonable speed.

Do you have any other Xlets that do more than what the CirclesXlet does? Some type of animation or screen updates?

csweeney
Offline
Joined: 2009-04-11
Points: 0

For logging we use log4crc/log4j. As noted in the README, if you copy the extras/log4crc up one level
(e.g.
From a command prompt located in the ocap-ri directory:
copy extras\log4crc .\
)
you will get more debug output. Examine the log4crc file for information about customizing log output.

The emulator is not throttled. We have noticed issues with graphics acceleration turned on. Current system recommendations are located on the 'System Configuration' tab on the ocap-ri.dev.java.net home page. Please let me know what your current system configuration is so that I can add it to the table and/or help with your performance issue.

Thanks,
Chris Sweeney

breaden
Offline
Joined: 2003-07-16
Points: 0

Thanks, I copied the log4crc file and that works great for logging.

BTW: I tried disabling all graphics acceleration on a dell optiplex w/ati radeon driver. It didn't help at all with the performance problems.

At this point I wouldn't mind losing video play back or any other RF features if it sped up the simulator -- as it is I can't really do anything with it.

Matt

csweeney
Offline
Joined: 2009-04-11
Points: 0

Do you mind providing a little more information about your hardware/software configuration? See https://ocap-ri.dev.java.net/servlets/ProjectProcess?tab=3 for the kind of information that _may_ be useful (we are still figuring this out).

breaden
Offline
Joined: 2003-07-16
Points: 0

Sure, I tried two dell core 2 duo machines with 2 gigs and page file disabled. One was optiplex w/ati radeon driver and the other was a dimension. Both have plenty of CPU/Memory for the job.

I also tried a dell demension with an AMD processor of some sort and a NVIDIO GeForce. ! Gig of ram and a page file.

The question I would ask is whether its fast on ANY machine? I'd be tempted to think it's a software problem. It worked fine on all three but very slowly and with low utilization of the CPU. The time between a repaint and when it shows up on the screen can be 30 seconds if any processing is required.

csweeney
Offline
Joined: 2009-04-11
Points: 0

This is the Circles application? We are not seeing any performance problems based on the "System Configuration" tab/table. In particular, I was running Windows XP under Sun's VirtualBox on a MacBookPro - the Circles app worked just fine, but the Tune Test (which launches VLC to stream video) failed. With VirtualBox the guest os only has access to one core...

When I run under boot camp, Windows has control over both cores (and everything works fine).

So, I suppose, the answer is "Yes, its fast in my/our environments". What jvm is installed? (the binary distribution uses whatever is installed on the machine). Are you using Windows XP?

breaden
Offline
Joined: 2003-07-16
Points: 0

PROBLEM SOLVED. Thanks for all you help. It had to be something I was doing given all your experience and I found it.

FYI: I had modified the CirclesXlet to include some network IO to a local server. I thought UDP would have low impact so I used it. This was the problem. Trying to send a few packets from UDP is very slow. You'll have to look at this at some point.

I switched to TCP and the performance is great. Very cool.