https://bugzilla.wikimedia.org/show_bug.cgi?id=58259

       Web browser: ---
            Bug ID: 58259
           Summary: Use Function rather than $.globalEval to compile
                    cached JavaScript code
           Product: MediaWiki
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: ResourceLoader
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]
    Classification: Unclassified
   Mobile Platform: ---

The scope of eval()'d code is determined by the scope in which it was created
and by whether or not the code uses the ES5 strict mode pragma. This makes it
so tricky to analyze that at least one JavaScript engine, V8, declines to
optimize it altogether. The same is not true of JavaScript source compiled via
the Function object constructor, since such code always executes in global
scope.

We should test if Function is faster and use it if so.

See this Wikitech-l thread for context:
<http://www.gossamer-threads.com/lists/wiki/wikitech/414263#414263>.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to