Performance/Snappy
Project "Snappy"
Goal
Project Snappy will make improvements to Firefox desktop responsiveness by completing smaller, isolated pieces of work.
This project is a responsiveness equivalent of Performance/MemShrink.
Scope
- Code that impacts the responsiveness of the Firefox desktop browser
- Out of scope
- Major architectural changes such as electrolysis (e10s) and supersnappy
- Firefox mobile, apps WebRT, B2G
- Development of performance benchmarks
- UI changes for perceived performance
Projects
- Temporary & Severe Browser Hangs
- Content Responsiveness (intermittent hangs)
- Start-up & Shutdown
- Tools
- Add-on and Web page introduced slowness
- Page load
- Tabstrip
Communication
Communication Type | Mechanism | Audience |
---|---|---|
Announcements | dev-platform and dev-planning lists | all |
General discussion | dev-platform list | devs |
Meetings | Alternate Thursdays, 11am PT
|
all |
Meeting summaries | this wiki and Taras Glek's blog | all |
Press
- May 14, 2012 - PCWorld: Firefox 13 Gets a Triple Shot of Speed Through Mozilla's 'Project Snappy'
- May 11, 2012 - WebProNews: Mozilla Makes Firefox 13 Super Speedy
Blog Posts
- Mar 12, 2013 Benoit Girard: Shutdown Report Results
- Feb 15, 2013 Aaron Klotz: Plugin Hang UI on Aurora
- Jan 24, 2013 Vladan Djeric: Add-on performance problems
- Jan 18, 2013 Benoit Girard: Is Your Shutdown Slow? Turn On The Performance Reporter!
- Jan 11, 2013 Benoit Girard: Analyzing page load performance frame-by-frame
- Jan 4, 2013 - Taras Glek: Snappy: 2012 Summary
- Dec 5, 2012 - Benoid Girard: Analyzing Shutdown Performance
- Nov 25, 2012 - Vladan Djeric: New about:telemetry page in Firefox 19
- Sep 22, 2012 - Jared Wein: Firefox Performance/Snappy Work Week: Warsaw edition
- Sep 18, 2012 - Taras Glek: Snappy in Warsaw: pierogy-fueled hackfest
- Jun 8, 2012 - Vladan Djeric: Cache, plugin, font operations most common in chrome hang reports
- May 30, 2012 - Vladan Djeric: Profiling with the Built-in Gecko Profiler and Local Symbols on Windows
- May 17, 2012 - Vladan Djeric: Looking at my own about:telemetry data
- May 14, 2012 - Vladan Djeric: More Telemetry from Super-Slow Startups
- May 11, 2012 - Lawrence Mandel: Getting snappy – performance optimizations in Firefox 13
- Mar 21, 2012 - Vladan Djeric: Introducing Chrome Hang Reporting and the Symbolication Server
- Mar 14, 2012 - Dietrich Ayala: Firefox 11 is Smaller and Faster
- Feb 8, 2012 - Brian Bondy: Snappy optimizations for faster Firefox startup
- Jan 31, 2012 - Vladan Djeric: Telemetry from Super-slow Startups, First Impressions
Minutes and Progress Reports
2013 |
---|
|
2012 | |
---|---|
|
2011 |
---|
|
Bug Tracking
Bugs tracked by the Snappy project are prioritized by adding one of [Snappy:P1], [Snappy:P2], or [Snappy:P3] to the whiteboard. Use whiteboard [Snappy] tag to nominate bugs.
- Snappy dashboard - shows recent Snappy changes
- Unprioritized Snappy bugs. These are triaged occasionally.
- Snappy:P1 bugs. These are discussed regularly in meetings.
Bugzilla query error
Invalid type (count) and display (table) combination1
- Snappy:P2 bugs. These are discussed occasionally in meetings. P2 is the default priority.
Bugzilla query error
Invalid type (count) and display (table) combination1
- Snappy:P3 bugs. These are discussed rarely in meetings.
Bugzilla query error
Invalid type (count) and display (table) combination1
Some other interesting bugs/lists.
- bugs that need telemetry probes implemented
- visible unresponsiveness metabug
- sync storage main-thread-io metabug
- cycle collector responsiveness metabug
Goals
- 50ms responsiveness when typing in a textbox (bug 703668)
- 60fps animations on UI operations, i.e. closing tabs (bug 702509)
- track above via telemetry
more goal thinking responsiveness goals
My (Asa) proposed core measures:
- Startup on par with IE and Chrome
- 50ms responsiveness for all non-animated primary UI interactions (list TBD)
- "Above the fold" uncached page load on par with IE and Chrome
- Back/Forward navigation as fast as Opera.
Snappy Addons
If you discover an addon that may be causing responsiveness issues
- Capture a profile of the jank with SPS Profiler.
- File a bug under Tech Evangelism/Add-ons. Describe the issue, steps to reproduce. bugzilla link.
- Upload your SPS profile + post link in bug
- Contact addon author. Authors are usually happy to make their addons more performant.
- If the developer isn't responsive we will get AMO team involved to consider delisting the offending addon version.
See bug 777397 for an example of above process.
Wins
Bugzilla query error
Invalid type (count) and display (table) combination1
- Firefox 16
- Firefox 15
- Start-up optimization - remove prefetch files (backed out in Firefox 16)
- No more font enumeration
- All fixed bugs
- Firefox 14
- IE profile migrator rewrite
- Async favicons
- Slow SQL Telemetry
- All fixed bugs
- Firefox 13
- Tabs on demand
- CC/GC pause reductions
- Start-up optimizations
- Front-end Telemetry
- All fixed bugs
- Firefox 12
- about:jank
- Inline autocomplete
- Slow SQL Telemetry
- All fixed bugs
- Firefox 11
Snappy TODO
Firefox
- 712478: interactivity heuristics (to reduce jank while playing video, scrolling)
- 650968: fix personas (startup slowdown, possibly other jank)
- 729330: fix addon manager (startup slowdown)
- 699820: fix remaining main thread sqlite (significant source of jank)
- 743069: fix our tab bar responsiveness (switching tabs, tab animations, etc. We lag other browsers in this area)
Platform
- 627635 Make localstorage async (Don't allow web pages to jank us)
- 692255 get rid of windows prefetch (so we can enable library reordering for a big startup win)
- 722243 cancellable sql queries (Cancel background queries to improve interactive performance)
- 692557 Fix GFX acceleration lag (Currently GFX acceleration can result in a severe slowdown over non-accelerated case)
- 705594 Font enumeration lag (This can add minutes of lag on some windows/mac machines)
- OFTC on desktop (Needed for smooth animations)
- Necko improvements (cache, connection pools, etc)
Current Infrastructure
- Information on adding new Telemetry probes
- Event Tracing: http://mxr.mozilla.org/mozilla-central/source/toolkit/xre/EventTracer.cpp#38
- Fires events at main thread event loop from background thread, measures response time
- Produces output of the form MOZ_EVENT_TRACE sample <timestamp> <duration>
- Being rolled out as part of Talos Tp5 bug 631571, will produce a responsiveness metric for "responsiveness while running Tp5"
- Peptest: bug 674606
- Responsiveness regression test harness
- Allows devs to write tests that perform various actions and tests responsiveness using EventTracer
- Project page contains everything you need to know
- Run 'make peptest' from your object directory to run the tests (see running tests for command line instructions)
- Talos responsiveness tests - for details see bug 631571
Additional Infrastructure
- Have metrics do continuous trend analysis to see if our telemetry stats are getting better over time.
arewesnappyyet.com
- This should use our telemetry data to tell us whether we are meeting our expectations and how far off we are
- bug 703669 tracks the implementation of this site
Testing
Placeholder section for QA and testing.
- Takeaways from 2011-12-01 Meeting
- Goal of Project:
- Big hangs (~30s) are a problem, but small hangs (~5s) may be a bigger win
- Identify where we hang, why we hang, and plug those holes
- Things on Devs Radar:
- Meta Bugs: visible responsiveness (bug 698500), sync storage (bug 699820), cycle collector (bug 698919)
- Animation hangs are most visible
- Windows, Mac, Linux are all unique -- Windows is P1 for the project
- Firefox Built-in Profiler: late Q1'2012
- Chromhang Bugs: bug 705761, bug 705287, bug 705258, bug 705594, bug 704933, bug 699051
- Small Jank: using refresh driver to measure refresh-rate performance (ie. throbber, progress bar, etc -- Asa has more ideas)
- Measuring Snappiness: Telemetry use cases
- Metrics/Automation: for trend-analysis, finding regressions with Telemetry
- Where does QA fit in?
- P1: Desktop responsiveness competitive testing
- many of these problems need stack traces (something Telemetry cannot do)
- crowd-sourcing use cases where we are less Snappy
- A-B testing with other browsers (versions of Firefox, competitor browsers)
- Ownership of Snappy P1s
- Caching issues should have patches landed in the next week or so