MozillaZine

Javascript Performance Thread

Discussion about official Mozilla Firefox builds
mayankleoboy1
 
Posts: 364
Joined: February 25th, 2013, 9:52 pm

Post Posted October 22nd, 2016, 12:32 am

https://bugzilla.mozilla.org/show_bug.cgi?id=1297122 looks very promising.
(Use a separate thread for garbage collection)

Ver Greeneyes
 
Posts: 970
Joined: June 28th, 2008, 4:57 am

Post Posted October 22nd, 2016, 7:06 am

Yep, though important to note that (as stated in the bug) this doesn't mean concurrent GC - it just means that the main thread will wait on the GC thread, instead of running GC in the main thread. Still, this is the first step toward concurrent GC, which is an eventual goal :)

mayankleoboy1
 
Posts: 364
Joined: February 25th, 2013, 9:52 pm

Post Posted November 18th, 2016, 10:31 pm

i was just looking at arewefastyet.com , and on the Octane benchmark, JSC and the newer V8 engines are doing very well.
Firefox looks slower in comparison.
AFAIR, we had reached an almost parity with V8, and JSC was slower than both. What the hell did these guys do, and why isnt IM doing them

Ver Greeneyes
 
Posts: 970
Joined: June 28th, 2008, 4:57 am

Post Posted November 19th, 2016, 6:04 am

The main gap in performance seems to be on 64-bit builds. Bug 1308506 is open about that, but I'm not sure when it'll get the focus. Recently the focus has been on architectural improvements like splitting out control flow graph generation and CacheIR, though I think most of the resources are going into developing the WebAssembly engine BaldrMonkey.

Josa
 
Posts: 2149
Joined: July 28th, 2009, 4:52 pm

Post Posted November 19th, 2016, 6:30 am

They created a meta bug about performance: https://bugzilla.mozilla.org/show_bug.cgi?id=1307062
But I think only Jan de Mooij is focused on improving performance. There's people working on WASM, conformance to ES6 / ES2017, js-startup-cache... Brian Hackett has been working on the Web Replay for a year... I hope that really is worthy.

mayankleoboy1
 
Posts: 364
Joined: February 25th, 2013, 9:52 pm

Post Posted December 16th, 2016, 9:22 am

https://bugzilla.mozilla.org/show_bug.cgi?id=1324002
Brian Hackett started working on JS again \o/

Ver Greeneyes
 
Posts: 970
Joined: June 28th, 2008, 4:57 am

Post Posted December 17th, 2016, 7:10 am

mayankleoboy1 wrote:https://bugzilla.mozilla.org/show_bug.cgi?id=1324002
Brian Hackett started working on JS again \o/

Indeed! Also check out the bug it blocks, bug 1323066, which is potentially very exciting. As you all probably know, Firefox is never going to do Chrome-style process-per-tab. Even Chrome is moving away from that model to improve memory usage last I heard. But right now Javascript for all tabs is run on a single thread!

It looks like we might finally be in a position to change that, now we have a compartment per global, the old ineffable JSContexts have gone away (the one that's left becoming the new JSRuntime), memory allocation happens per zone, and zones roughly (if not completely) correspond to a tab. It'll take some work in the JS engine to try and eliminate full GCs, and some work on the Gecko end to make things thread-safe, but it would be a great boon to responsiveness if they could pull it off.

Ver Greeneyes
 
Posts: 970
Joined: June 28th, 2008, 4:57 am

Post Posted January 1st, 2017, 7:30 am

In recent performance news, check out the dependencies of the CacheIR tracking bug! jandem and evilpie have been plugging away at expanding CacheIR and optimizing more cases. There's a WIP in bug 965992 that fixes a long-standing DOM performance issue using CacheIR, and evilpie is finding interesting things that affect sites like Twitter and Google Docs.

Ver Greeneyes
 
Posts: 970
Joined: June 28th, 2008, 4:57 am

Post Posted January 25th, 2017, 1:06 pm

jandem wrote a blog post about the recent CacheIR developments: check it out :) It's been very satisfying to follow along with this work, watching jandem and evilpie solve years old performance bugs, remove tons of hairy code and discover and fix performance issues on big websites that would have been pretty painful to fix before now. The CacheIR-to-MIR compiler sounds like it should be a nice generalization and make ICs into true first-class citizens as far as code generation is concerned!

Ezh
 
Posts: 439
Joined: November 5th, 2002, 1:35 pm
Location: Tallinn, Estonia

Post Posted January 26th, 2017, 4:06 am

Are those improvements got to in Aurora 53?

Josa
 
Posts: 2149
Joined: July 28th, 2009, 4:52 pm

Post Posted January 26th, 2017, 5:35 am

Ezh wrote:Are those improvements got to in Aurora 53?

Yes

Ver Greeneyes
 
Posts: 970
Joined: June 28th, 2008, 4:57 am

Post Posted January 28th, 2017, 4:47 am

Here's a newsgroup post by Brian Hackett about his ongoing work to make the JS engine multi-threaded. This will potentially put each tab on its own thread (execution context, technically, with a thread pool serving each context in a round robin fashion), which should be a great boon to performance for anyone with more tabs than processes! The work is still in its early stages, but there don't seem to be any huge roadblocks anymore :)

Peja Stija

User avatar
 
Posts: 484
Joined: June 4th, 2008, 8:46 am
Location: Belgium (proud producer of waffles)

Post Posted January 30th, 2017, 7:09 pm

After finally getting rid of the last add-ons which prevented me from using e10's (Dom Inspector, Self-Destructing Cookies), I'm positively surprised by the fluently it feels now. :)

Josa
 
Posts: 2149
Joined: July 28th, 2009, 4:52 pm

Post Posted March 3rd, 2017, 8:04 pm

It seems https://bugzilla.mozilla.org/show_bug.cgi?id=1328140 is going to improve JS perf in a lot of cases where Firefox is not so fast.

greg86
 
Posts: 48
Joined: January 28th, 2007, 11:33 am
Location: Germany

Post Posted March 4th, 2017, 8:55 am

Why isn't there any progress on any Benchmark on the front page of AWFY in the last month?
I know Sunspider isn't that representative any more but why its staying at the front page?
Are there any better "modern" Benchmarks that show more the improvements in the JS Engine?

Return to Firefox Builds


Who is online

Users browsing this forum: No registered users and 3 guests