assets/src/org/ruboto/ScriptLoader.java in ruboto-0.10.2 vs assets/src/org/ruboto/ScriptLoader.java in ruboto-0.11.0.rc.0
- old
+ new
@@ -74,15 +74,18 @@
rubyClass = JRubyAdapter.runScriptlet("Java::" + component.getClass().getName());
}
System.out.println("Set class: " + rubyClass);
JRubyAdapter.put(component.getScriptInfo().getRubyClassName(), rubyClass);
- Thread t = new Thread(new Runnable(){
+ // FIXME(uwe): Collect these threads in a ThreadGroup ?
+ Thread t = new Thread(null, new Runnable(){
public void run() {
+ long loadStart = System.currentTimeMillis();
JRubyAdapter.setScriptFilename(rubyScript.getAbsolutePath());
JRubyAdapter.runScriptlet(script);
+ System.out.println("Script load took " + (System.currentTimeMillis() - loadStart) + "ms");
}
- });
+ }, "ScriptLoader for " + rubyClass, 128 * 1024);
try {
t.start();
t.join();
} catch(InterruptedException ie) {
Thread.currentThread().interrupt();