applet, lot's of requests for bsh.class

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

applet, lot's of requests for bsh.class

Christian Reichlin

i use beanshell in an applet. it was extremely slow, after a while i
found out that there were lots of requests to the applet codebase,
looking for classes named "bsh".
i found out that the most of this class requests went trough
ClassManagerImpl.classForName() so i filtered them out there.
after this, i found out that there is more of a similar behaviour:
each time i check a variable vor void there is a class request sendt to
the server for each imported package

interpreter.eval("if(foo != void){}");
results in several:

does anyone have an idea how to get rid of this behaviour? filtering out
all this calls in the classForName method is not a long term solution.


the stack of the classForName call for the example above looks like:
Thread [main] (Suspended (breakpoint at line 153 in ClassManagerImpl))
    ClassManagerImpl.classForName(String) line: 153
    NameSpace.classForName(String) line: 1237
    NameSpace.getImportedClassImpl(String) line: 1213
    NameSpace.getClassImpl(String) line: 1127
    NameSpace.getClass(String) line: 1078
    Name.consumeNextObjectField(CallStack, Interpreter, boolean,
boolean) line: 301
    Name.toObject(CallStack, Interpreter, boolean) line: 202
    Name.toObject(CallStack, Interpreter) line: 185
    NameSpace.get(String, Interpreter) line: 238
    Interpreter.get(String) line: 829
    Interpreter.getu(String) line: 841
    Interpreter.<init>(Reader, PrintStream, PrintStream, boolean,
NameSpace, Interpreter, String) line: 200
    Interpreter.<init>(Reader, PrintStream, PrintStream, boolean,
NameSpace) line: 215
    Interpreter.<init>() line: 250
    bshtest.main(String[]) line: 7

version: 2.0b4

This email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
Beanshell-users mailing list
[hidden email]