InterpreterData is immutable after compilation. If you execute the same 
org.mozilla.javascript.Script object obtained through Context.compileReader() 
in different scopes, the functions it defines will share the same 
InterpreterData instance. 

The trick is thus to compile a source .js file once into a Script object, and 
then use it for repeated execution.

Attila.

On 2010.03.03., at 13:36, Johan Compagner wrote:

> Hi,
> 
> We have 2 kind of clients, 1 is a swing client and there there is not really
> a problem
> But the other is a web client that runs on the server
> 
> There we can have for example 10 clients and if i look what the total
> InterpreterData object size is for those 10 clients is is that 75MB mem
> usage
> But that is pretty much all the same kind of data. So if i could share that
> then that would be 7.5MB of total of InterpreterData objects
> that then is reused by a InterpretedFunction function that is tied to a
> specific client.
> 
> The question is does InterpreterData has changing state? Or is it after
> compile static?
> 
> johan
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to