• Gabriel Ivăncescu's avatar
    jscript: Create the source function's 'prototype' prop object on demand. · 27ceb62e
    Gabriel Ivăncescu authored
    The 'prototype' prop of a source function is, by default, an empty object with
    a 'constructor' prop pointing back to the function. Currently, every source
    function is created in this fashion, which makes it a circular reference
    and thus prevents it from being freed until the Garbage Collector kicks in.
    
    The performance impact comes from the function keeping a ref to the
    enclosing scope, and since the scope is being held by it, the engine will
    detach the scope, believing it to be used for the time being (until the
    GC cleans it). This can cause substantial performance issues for such a
    common case. The FFXIV Launcher, for example, leaks a large amount of such
    short-lived functions and the enclosing scopes.
    Signed-off-by: 's avatarGabriel Ivăncescu <gabrielopcode@gmail.com>
    27ceb62e
Name
Last commit
Last update
dlls Loading commit data...
documentation Loading commit data...
fonts Loading commit data...
include Loading commit data...
libs Loading commit data...
loader Loading commit data...
nls Loading commit data...
po Loading commit data...
programs Loading commit data...
server Loading commit data...
tools Loading commit data...
.editorconfig Loading commit data...
.gitlab-ci.yml Loading commit data...
.mailmap Loading commit data...
ANNOUNCE Loading commit data...
AUTHORS Loading commit data...
COPYING.LIB Loading commit data...
LICENSE Loading commit data...
LICENSE.OLD Loading commit data...
MAINTAINERS Loading commit data...
README Loading commit data...
VERSION Loading commit data...
aclocal.m4 Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...