Yes looks good otherwise and fairly simple to merge with optimistic types. /M
On 03 Mar 2014, at 10:36, Hannes Wallnoefer <[email protected]> wrote: > I didn't notice any overhead from synchronization. > > I did notice a small reduction in performance from using soft references > instead of hard references in PropertyMap history in some benchmarks (mostly > deltablue I think). However, other solutions but they either had worse > effects on performance or could possibly cause memory leaks. > > Still I think the net effect on performance is a positive one (even if only > slightly) caused by reduced listener creation and history lookup overhead. > > Hannes > > > Am 2014-03-02 10:39, schrieb Marcus Lagergren: >> Have you done any benchmarking whether the synchronization in >> PropertyListeners gives us overhead? Any other numbers we should know about? >> >> On 27 Feb 2014, at 18:22, Hannes Wallnoefer <[email protected]> >> wrote: >> >>> Please review JDK-8035948 - Redesign property listeners for shared classes: >>> >>> http://cr.openjdk.java.net/~hannesw/8035948/ >>> >>> This prepares property maps and property listeners to work better with >>> classes that are reused between JS environments. The central ideas are: >>> >>> - Reuse property maps between globals in order to minimize polymorphism. >>> - Use SoftReferences for property map history to avoid memory leaks >>> - Redesign property listeners to be attatched to property maps only since >>> ScriptObjects are specific to one JS environment. >>> - Reduce number of property listeners by only creating them when needed >>> (when a callsite accesses an inherited property). >>> - Reduce number of prototype history lookups in property maps by using a >>> unique combination of prototype/property maps from the start. >>> >>> Actual class sharing functionality is coming in a later webrev. Let me know >>> if you have any questions about this. >>> >>> Hannes >
