[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-nashorn-dev
Subject: Re: Efficiency of context-per-thread on shared engine vs. engine + context per thread?
From: "Jim Laskey (Oracle)" <james.laskey () oracle ! com>
Date: 2017-02-27 12:14:30
Message-ID: DEF531D3-56E8-4E9D-9347-7B7C9B121D86 () oracle ! com
[Download RAW message or body]
From basic experience I found that using a single engine, using JavaScript code to \
create the new threads and using loadWithNewGlobal to start each thread gave the best \
overall performance.
- Jim
> On Feb 27, 2017, at 7:58 AM, Frantzius, Jörg <Joerg.Frantzius@aperto.com> wrote:
>
> Hi,
>
> for our application we're about to implement a global-per-thread on single engine \
> approach, and I'd be very thankful if someone in the know could share some insights \
> on whether this is worth the effort when compared to engine-per thread (as the \
> latter seems much more easy to implement for us).
> More precisely the question is whether a single engine with multiple ScriptContexts \
> is substantially more resource-efficient than multiple engines (each with their own \
> ScriptContext)? Does Nashorn e.g. share code-optimization between engines? Or does \
> it share code-optimization between ScriptContexts on a single engine in the first \
> place?
> Also it would be great to know about the memory-footprint of the engine, e.g. \
> http://stackoverflow.com/questions/24116672/how-much-memory-does-a-nashorn-scriptengine-use \
> seems to say that an empty engine is ~324KB, but I'd expect that to be higher when \
> it is actually executing code.
> Thanks for any insights + regards,
> Jörg
>
>
> ---
>
> Dipl. Inf. Jörg von Frantzius, Technical Director
>
> E-Mail joerg.frantzius@aperto.com
>
> Phone +49 30 283921-318
> Fax +49 30 283921-29
>
> Aperto GmbH – An IBM Company
> Chausseestraße 5, D-10115 Berlin
> http://www.aperto.com<http://www.aperto.de/>
> http://www.facebook.com/aperto
> https://www.xing.com/companies/apertoag
>
> HRB 77049 B, AG Berlin Charlottenburg
> Geschäftsführer: Dirk Buddensiek, Kai Großmann, Stephan Haagen, Daniel Simon
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic