Review request for JDK-8141425: Improve caching in NashornCallSiteDescriptor

Marcus Lagergren marcus at
Wed Nov 4 16:32:48 UTC 2015

Looks good. +1 Attila.


> On 04 Nov 2015, at 14:59, Attila Szegedi <attila.szegedi at> wrote:
> Please review JDK-8141425 "Improve caching in NashornCallSiteDescriptor" at <> for <>
> Few words on the implementation:
> - I went with one String->NamedOperation map per Nashorn operation, as this makes it unnecessary to create a NamedOperation to use as a key (and then have the map use its equals/hashCode)
> - I went with global caching, which necessitates using weak/weak synchronized maps. Alternatively, we could’ve used a per-class caching as for the call site descriptors themselves, but as one class is one function in Nashorn, that’d result in reuse of NamedOperation objects only within a single function. (But we’d get rid of both synchronization and use of weak references.)
> Thanks,
>  Attila.

More information about the nashorn-dev mailing list