Counter with DOM
Usage szenario
We want a long running application write events to an monitor in an applet.
The applet writes it
- througth liveconnect
- througth DOM API
in an HTML-Page.
The Study
As a litte study we have an litte applet counting from 1..n
n=1000, n=100000.
Test-Environment
- CPU:
-
model name : Mobile Intel(R) Pentium(R) 4 - M CPU 2.20GHz
cpu MHz : 2193.224
cache size : 512 KB
- Software:
-
- Linux 2.4.20/glibc2.3.2,
- mozilla-1.6 /mozilla-1.7RC2
- javaplugin 1.5.0b
Older Conf:
j2eesdk-1.4.2
Investigations
Seen effects:
call:xxxxxx-Messages
Optical: on the terminal (stderr) where mozilla is started,
appear a call:xxxxxxx (In all versions using lifeconnect)
- It seems for each lifeconnect call after 321 calls for liveconnect services
- The first is ~ 9130
- The counter is jumping in case of getElementById-Call in increments of
16th
and in case of setAttributes in increments of 11.
hangup of javavm
After 4977 calls of getElementById the browser is in a livelock, a java_vm needs all the CPU-Power
strace -p (on this cpu burning thread) results
in an endless sequence of
read(9, 0x2f6e7573, 32) = -1 EFAULT (Bad address)
The filehandle 9 seems the socket from mozilla to java_vm
/proc/6785> ls -l fd/9
lrwx------ 1 rw users 64 2004-03-30 19:16 fd/9 -> socket:[394756]
Other