Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

too much data

 
Robert Kennedy
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am sending a string from a class in my applet to a javascript function in a web browser (in this case IE6-XP sp2).

If the string reaches a certain threshold (about 10 kb) the browser crashes with the following message: "Internet Explorer has encountered an error and needs to close."

The data received in the javascript function is repainted to an html display. To narrow down the cause I have limitedthe amout of data which is being repainted to a few lines.

The applet is simply a dot on the page which facilitates communication and data transfer, it is not the gui.

Is there a limit - threshold which must be respected when calling a javascript function from an applet class?
 
Robert Kennedy
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also I am curious. What happens when an applet calls a javascript function.

Is the data passed to the browser which handles the request?
or does the applet thread actually handle the request?

What happens if multiple calls are initiated before the browser or applet thread returns?

Is a new thread instantiated?
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, it can't be the applet handling the thread, because it's happening in JavaScript.

I'm not sure about JavaScript's multithreading capabilities, or the amount of data it can handle, but years of experience taught me that LiveConnect (which is how the Java/JavaScript integration is called) is brittle under the best of circumstances. And even if you figure out what you can get away with in IE, might well break in other browsers, and vice versa. So, I'd try hard to keep it simple and small.
 
Robert Kennedy
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. I tried different pcs and there does not appear to be an issue with data size. My pc has some visual studio dugging tools on it which causes IE to misbehave.

I am curious about the multi threading relationships in Javascript.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic