Subj : Re: Performance? To : Rickard From : Igor Bukanov Date : Thu Jun 19 2003 07:41 pm Rickard wrote: > Hi! > > I'm using Rhino as a way to accomplish dynamic extensions (aka portlets) > in our CMS, and also as a shell-type tool to access the system. > > Functionality wise everything is the way I want it to be, but the > performance is a bit troubling. Most of the time we do 5-10 lines of > code to get some data by calling services, then transforming it to be > suitable for HTML output. What surprised me is that these small snippets > can take about 100ms (and sometimes up to 500ms) to execute. > > I've tried all the usual suspects: doing a shared scope, calling > setOptimizationLevel(9) (which made no difference at all), etc. You should call setOptimizationLevel(-1) to force pure interpreted mode. In your case this is exactly what you need since this will avoid creation and loading of Java classes which can be extremly slow. Regards, Igor .