Firefox 40: Profiling JavaScript Performance and More

By Elio Qoshi

Firefox 40 comes with some powerful new tools and interesting shifts in strategy. Read on for the biggest changes in Firefox and what they mean for you.

New Performance Tools

Firefox 40 features new profiling tools that give developers a better understanding of what's happening from a performance standpoint within their applications. Developers can use these tools to profile performance in any kind of website, app, or game.

The Performance tab contains the new timeline, including three views:

  • a Waterfall view, giving insights into how your app is performing in the browser: waterfall performance

  • Call Tree view, highlighting any JavaScript performance bottlenecks: call tree js performance

  • Flame Chart view, showing the state of the JavaScript stack at every millisecond during the performance profile: flame chart view

Mozilla Hacks has produced a video introduction to the new performance tools:

There's also a demo of how to optimize the JavaScript in an HTML5 game using the new performance tools.

Head over to the Mozilla Hacks article for more details on the new performance tools.

All About Windows 10

Mozilla has integrated fresh optimizations for Microsoft's new operating system. These changes are mostly visual, but there are also subtle performance enhancements.

Mozilla says it has made

thoughtful tweaks to the interface to give Firefox a streamlined feel … [with] bigger, bolder design elements as well as more space for viewing the Web.

Firefox 39, on Windows 10, looks like this:

Firefox 39 on Windows 10

Firefox 40 on Windows 10 is quite different:

Firefox 40 on Windows 10

Firefox 40 has also improved stabilization in Windows 10—Mozilla tests suggesting that it went from 1 crash per 2 days on Windows 8.1 to 0 crashes in 16 days on Windows 10.

There has been controversy over Windows 10 making it difficult for users to switch away from Edge as the default browser and from Bing as the default search engine.

Firefox 40 makes it easier for users to choose their preferred search engine. To take advantage of this, navigate to Settings (Options) > Search to change the search in Firefox as well as Windows. However, note that you can only change your desktop search preferences when Firefox is your default web browser.

changing search preferences

Mozilla has helped with clear instructions for restoring Firefox as your default browser if you're struggling to do that in Windows 10.

Expanded Malware Protection

Malware detection features are now extended in Firefox 40. This has been made possible by recent developments in Google's Safe Browsing service—allowing Firefox to identify malware downloads on the platforms it supports and warn users about potentially unwanted software.

This was introduced in Firefox 39, which consisted of extending the monitoring of malicious file downloads to the Mac and Linux versions of Firefox.

When downloading a file of a type that usually contains Windows or Mac executable code (for example, .com, .exe, .msi, .app, .dmg), Firefox asks Google's Safe Browsing service if the file is safe, by sending it some of the download's metadata (file type, name, size, hash, URL, locale). If the file is flagged as harmful by this service, the download manager will block access to the file until the user performs a right-click, and unblocks it manually.

If you'd rather not send data to Google, you can turn off the feature.

In addition to this, Firefox 40 now issues a warning if users visit a page known to contain deceptive software that can make undesirable changes to your computer. If the user encounters such a page, the following warning will show up:

warning message

Add-on Signing

With Firefox 40, the era of distributed add-ons in a decentralized manner comes to an end. Unfortunately, there's not much room for this to change, as security and privacy seems to be a priority for Mozilla here.

Mozilla announced in February that it will introduce add-on signing in Firefox, to provide a safer add-on experience to its users. Jorge Villalobos, the Add-ons Developer Relations Lead at Mozilla, explains:

The Mozilla add-ons platform has traditionally been very open to developers. Not only are extensions capable of changing Firefox in radical and innovative ways, but developers are entirely free to distribute them on their own sites, not necessarily through AMO, Mozilla's add-ons site. This gives developers great power and flexibility, but it also gives bad actors too much freedom to take advantage of our users.

In Firefox 40, you'll see a warning if you're using an unsigned add-on. In Firefox 41, however, unsigned add-ons will be disabled, and you won't be able to enable them unless you head over to about:config and disable xpinstall.signatures.required. The plan is for the latter to be disabled in Firefox 42, after which there'll be no way to override that setting. There's been a lot of criticism of this, but it seems Mozilla has already made its decision.

Mozilla has provided an FAQ with more details on what's involved. Also, if you're an add-on developer, you might want to read the guidelines on the Mozilla Developer Network.

Other Notable Changes in Firefox 40

  • Firefox Hello now allows adding a link to conversations to provide context on what the conversation will be about (basically specifying a topic).
  • The scrolling, graphics, and video playback performance is vastly improved, with off main thread compositing in GNU/Linux.
  • Animations and scrolling are now smoother in Windows, thanks to VSync.
  • A new page ruler highlighting tool that displays lightweight horizontal and vertical rules on a page is now available.
  • The Inspector allows searches across all content frames in a page.

For a more complete list of changes, check out the Firefox 40 release notes.

Wrap Up

You can update your Firefox installation either by patiently waiting for the auto-update, choosing About Firefox within the browser's menu, or downloading the new installer manually from Firefox.com.

What do you think of Firefox 40? How do you feel about the add-on signing issue? Are the new features enhancing your experience? Especially if you're using Windows 10, let us know your thoughts in the comments!

  • M S i N Lund

    Is there an actual manual for the New Performance Tools somewhere?
    I don’t do videos, don’t want to sit trough some feature length movie presentation, i just want something to read and easily look up things in.

    Im looking at the UI, and It means absolutely noting to me.

    • Ralph Mason

      The article links to the Mozilla docs, where there’s a lot of info about what each of those things means: https://developer.mozilla.org/en-US/docs/Tools/Performance The menu on the left (under Performance) has a page on each part of the performance tools.)

      • M S i N Lund

        Thanks.
        Unfortunately its a low-contrast site.
        I never bother my eyes with those.

        • Elio Qoshi

          MDN a low-contrast site? Come on :)

  • Joe T

    i’m all for the security of add-on signing and the multi-thread feature to improve performance. But these two things are going to collide for some developers. Firebug 2 doesn’t support e10s (multi-threading), so with that feature enabled, upgrading to the pre-release of Firebug 3 is required. However, FB3 is currently unsigned and seems to be on a VERY slow release path, in which case it would eventually become impossible to use it with add-on signing enforced. (And side note: if you use FirePHP with Firebug, it doesn’t work with FB3.)

    • Elio Qoshi

      That’s a valid point, will forward that to some folks at Mozilla, thanks Joe :)

      • Joe T

        Awesome, thank you. Hope to see some kind of greater plan from them regarding these two features & how it’ll impact developers so we know what to expect from the tools we rely on. :-)

        • This is how it is possible to make sixty-five dollars /an hour… After being without work for six! months , I started freelancing over this web-site and now I could not be happier . 3 months have passed since being on my new job and my income is around 5000 dollarsmonth -Check Link on MY~DISQUS~PROFILE for more information

Get the latest in Front-end, once a week, for free.