Calling method on object passed from applet - Performance..

S

SPG

Hi,

I am using an applet to make callbacks into a javascript function. This
function takes an object as a parameter.
When I make the call from the applet into the javascript function, The
function then reads properties from the object and does some stuff.

This is all fairly straight forward and works fine but...

When we are using the MS JVM, it runs fine, and has no performance issues.
When we run using any of the SUN JVMs there is a massive hit on the CPU and
we tend to get a max out at 100%.

I have tried to search for ways to optimize this, but the hit seems to be
when we actually make the call from javascript into the object methods:

function processUpdate(msg) {
try{
//Here is the big hit!
var id = msg.getID();
var date = msg.getDate();
var bid = msg.getBid();
var ask = msg.getAsk();

var table = document.getElementById("Prices");
var row = table.rows[id];
row.cells[0].firstChild.nodeValue = id;
row.cells[1].firstChild.nodeValue = date;
row.cells[2].firstChild.nodeValue = bid;
row.cells[3].firstChild.nodeValue = ask;
}catch(e) {
alert(e);
}
}

The methods themselves are just proerty gets, so the simply do return fo a
variable value.

Has anyone ever come acroass this problem and know a solution?

Regards,

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top