<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[All About Performance]]></title>
  <link href="http://taras.glek.net/atom.xml" rel="self"/>
  <link href="http://taras.glek.net/"/>
  <updated>2013-04-05T20:26:58-07:00</updated>
  <id>http://taras.glek.net/</id>
  <author>
    <name><![CDATA[Taras Glek]]></name>
    
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  
  <entry>
    <title type="html"><![CDATA[Mozilla Tech on Reddit]]></title>
    <link href="http://taras.glek.net/blog/2013/04/05/mozilla-tech-on-reddit/"/>
    <updated>2013-04-05T20:02:00-07:00</updated>
    <id>http://taras.glek.net/blog/2013/04/05/mozilla-tech-on-reddit</id>
    <content type="html"><![CDATA[<p>I posted earlier about <a href="http://taras.glek.net/blog/2013/02/15/is-planet-mozilla-obsolete/">planet mozilla being obsolete</a>. To move forward, we need to experiment with some alternatives. Mozilla contributor, <a href="https://twitter.com/djco">@djco</a>, setup a <a href="http://www.reddit.com/r/MozillaTech/">reddit feed</a> so we can up-vote technical content and down-vote the rest.</p>

<p>I know a number of good people who stopped reading and posting on planet because of irrelevant, offensive, etc content. Please give the reddit feed a try. Maybe once we get enough people moderating, we&#8217;ll encourage more quality content.</p>

<p>I am not suggesting that people stop posting pictures of their cats, dictionary entries on planet. I only want to filter that out so I can have a satisfying technical feed.</p>

<p>Please try out the <a href="http://www.reddit.com/r/MozillaTech/">reddit feed</a> and let <a href="https://twitter.com/tarasglek">me</a> and <a href="https://twitter.com/djco">Dirkjan</a> know if it works for you. We are open to other suggestions too.</p>
]]></content>
  </entry>
  
  
  
  <entry>
    <title type="html"><![CDATA[Snappy #55: Snappy Evolution]]></title>
    <link href="http://taras.glek.net/blog/2013/03/27/snappy-number-55-snappy-evolution/"/>
    <updated>2013-03-27T03:56:00-07:00</updated>
    <id>http://taras.glek.net/blog/2013/03/27/snappy-number-55-snappy-evolution</id>
    <content type="html"><![CDATA[<p>The Snappy name will be retired in favor of Performance: we will be expanding our meta scope beyond desktop Firefox responsiveness.</p>

<p>I think as a result of Snappy, Firefox is in a much happier performance place now. There are a big wins remaining, but we have tools and ideas on how to get there. We&#8217;ve come a long way from &#8220;how to make Firefox feel fast?&#8221; discussions in late 2011.</p>

<p>Snappy has been a tricky meta-project because work has to happen across teams. While my Performance team has an exclusive commitment to performance, other teams have to context-switch between feature-work, platform-work, performance, etc. There are also team culture differences on internal vs external communication, planning, etc.</p>

<p>Some of the projects are quite hard and require specialized expertise. This meant that we&#8217;d make a bunch of progress on a project (eg breakpad profiler backend) only to realize that we are blocked on someone we didn&#8217;t loop into the project right away (eg Ted). Ideally we will minimize chances of surprises like this in the future.</p>

<p>Until recently my solution was to deal with this as a manager. I&#8217;d sync up with relevant managers about Snappy needs and try to get some Snappy bugs onto relevant team&#8217;s todo. This has worked out ok, but there were a few too many instances of unexpected delays due to shifting team priorities, miscommunication, general lag. My conclusion is that at a developer-driven organization like Mozilla heavy manager involvement on Snappy-type projects is a sign that we are doing it wrong. Developers should be adding performance goals to their team&#8217;s agenda.</p>

<p>Last week we came up with a more developer-centric way to do performance work. I&#8217;ll still be around making sure things are moving forward, but from now one I&#8217;d like to see developers drive planning &amp; coordination on a per-project basis. I&#8217;ll introduce individual projects + their respective blogs as they start in the next couple of weeks.</p>

<p>Irving Reid (addon-manager startup performance lead) summed up key mechanics of the new approach in an email. Thanks, Irving.</p>

<h3>Irving&#8217;s Summary</h3>

<p>Coming out of the Snappy work week, we decided to try and make performance projects a little more structured than they have been in the past; see <a href="http://lawrencemandel.com/2013/03/21/no-more-snappy-meetings-and-other-changes-from-the-snappy-team/">Lawrence&#8217;s post</a> for a summary.</p>

<p>While not mentioned in Lawrence&#8217;s blog, one of the things Taras (if I recall correctly) suggested was to have a project kick-off meeting to get rough agreement on scope, responsibilities, and how we&#8217;re going to track progress. If everyone is happy with settling those questions over email, we can; I think we lose a little by not getting a chance to see and hear each other directly, but it is rather painful to get that scheduled in the current circumstances.</p>

<p>In any case I wasn&#8217;t planning on delaying work until after the meeting could happen; it&#8217;s more about getting things as clear as we can, as early as we can.</p>

<p>The current plan is for Felipe and I to do the patches, with me handling coordination and progress tracking as well. Everybody else is involved to make sure we&#8217;re going in the right direction, and help us over roadblocks.</p>

<p>The progress tracking technique the Snappy team settled on last week was a combination of daily one-line updates using the <a href="http://teamstat.us/#browse/irc.mozilla.org/perf">status bot</a> in the #perf channel, and a blog post every two weeks summarizing overall progress. I&#8217;ll do the <a href="http://www.controlledflight.ca/category/mozilla/">blog posts</a>; depending on how things go I may do them weekly instead of biweekly.</p>
]]></content>
  </entry>
  
  
  
  <entry>
    <title type="html"><![CDATA[Snappy #54: Snappy Discussion in Paris]]></title>
    <link href="http://taras.glek.net/blog/2013/03/26/snappy-number-54-snappy-discussion-in-paris/"/>
    <updated>2013-03-26T04:16:00-07:00</updated>
    <id>http://taras.glek.net/blog/2013/03/26/snappy-number-54-snappy-discussion-in-paris</id>
    <content type="html"><![CDATA[<h3>Meeting In Paris</h3>

<p>Last week Snappy people met in Paris at <a href="http://www.irill.org/about">IRILL</a>. I like small venues because they encourage conversations. IRILL is one of the best small work venues I&#8217;ve attended.</p>

<p>Excellent Parisian food did not hurt :)</p>

<h3>Workweek Presentations</h3>

<p>I was impressed by the number and quality of presentations this time. I suspect having a presentation-friendly venue helped.</p>

<p>Talks/discussions/notes (please leave a comment if I missed a talk):</p>

<ul>
<li>Gabriele Svelto: <a href="http://people.mozilla.org/~tglek/paris2013/b2g_slides.pdf">Firefox OS Performance</a></li>
<li>Benoit Girard: <a href="http://benoitgirard.wordpress.com/2013/03/25/profiler-snappy-work-week/">profiler improvements</a></li>
<li>Nathan Froyd + Avi Halachmi: <a href="http://blog.mozilla.org/nfroyd/2013/03/25/perf-workweek-talos-discussion/">Talos flaws + improvements to focus on</a></li>
<li>Nathan Froyd: <a href="http://people.mozilla.com/~nfroyd/paris-workweek-2013/">How Firefox Makes Your JavaScript Run Fast</a></li>
<li>Julian Seward: <a href="http://people.mozilla.org/~tglek/paris2013/sps_breakpad.pdf">Stack unwinding for Gecko Profiler</a></li>
<li>Julian Seward: <a href="http://people.mozilla.org/~tglek/paris2013/data_races.pdf">&#8216;Harmless&#8217; data races in Gecko</a></li>
<li>Marco: <a href="http://mozilla.bonardo.net/paris2013/">SQLite pitfalls</a></li>
<li>Vladan Djeric: <a href="http://people.mozilla.com/~vdjeric/perfweek_paris2013/">Firefox startup analysis</a></li>
<li>Vladan Djeric: <a href="https://etherpad.mozilla.org/chromehangsMarch">Chromehang prioritization etherpad</a></li>
<li>Vladan Djeric: <a href="http://people.mozilla.com/~vdjeric/flashDiscussionDiagram.JPG">Flash-caused hangs whiteboard</a></li>
<li>Jet: Shumway Demo</li>
<li>David Teller: Introduction to Promises, Task.jsm</li>
<li>Lawrence Mandel: Discussion on how to accomplish reviews faster. Lawrence will <a href="http://lawrencemandel.com/">blog</a> notes on this soon.</li>
<li>Taras Glek + Lawrence Mandel: <a href="http://lawrencemandel.com/2013/03/21/no-more-snappy-meetings-and-other-changes-from-the-snappy-team/">Improving coordination + focus</a></li>
<li>Taras Glek: <a href="http://people.mozilla.org/~tglek/pydoop2013/">Telemetry reboot plan + doing hadoop map/reduce in python</a></li>
</ul>


<h3>Team Activity</h3>

<p>For a team activity we walked to the <a href="http://en.wikipedia.org/wiki/Catacombs_of_Paris">Paris Catacombes</a>.</p>

<p><img src="https://lh6.googleusercontent.com/-dUluprOFvY0/UUoRsBAC1oI/AAAAAAAAIj8/WjOYb7uHij4/s580/20130320_123837.jpg" title="Relevance to writing software? Multi-million line codebases are boneyards of some kind" ></p>
]]></content>
  </entry>
  
  
  
  <entry>
    <title type="html"><![CDATA[snappy #53: Faster: Startup, Image Decoding, Touchpad Input. Smoother Animations]]></title>
    <link href="http://taras.glek.net/blog/2013/03/25/snappy-number-53-faster-startup/"/>
    <updated>2013-03-25T06:25:00-07:00</updated>
    <id>http://taras.glek.net/blog/2013/03/25/snappy-number-53-faster-startup</id>
    <content type="html"><![CDATA[<h3>Responsiveness</h3>

<p>Joe Drew taught Firefox to decode images on multiple threads. It took a mere 29 patches in <a title="Multithreaded image decoding" href="https://bugzilla.mozilla.org/show_bug.cgi?id=716140">bug 716140</a>. This should speed up page-load and improve tab-switch times. This task was considered too hard a year ago when Snappy people were discussing potential improvements.</p>

<p>Masayuki Nakano improved Firefox scrolling responsiveness on modern touchpads in <a title="Scrolling using some high-resolution-scroll aware touchpads feels slow" href="https://bugzilla.mozilla.org/show_bug.cgi?id=829952">bug 829952</a>. Dealing with scroll-events on Windows is a mess. It&#8217;s nice when we make forward progress in this area.</p>

<p>Marco Bonardo fixed a mysterious cause of main thread IO I ran into in <a title="Avoid repeated execution of expensive daysOfHistory query" href="https://bugzilla.mozilla.org/show_bug.cgi?id=830423">bug 830423</a>. I ran into this issue because I compulsively navigate to <code>about:telemetry</code> in Firefox and look in &#8216;Slow SQL Statements&#8217; and &#8216;Browser Hang&#8217; sections. I encourage readers of this blog to check out that data whenever Firefox is under-performing.</p>

<h3>Startup</h3>

<p><a title="Use readahead for ordered jar files such as omni.ja. Should be ~10% startup speedup" href="https://bugzilla.mozilla.org/show_bug.cgi?id=810151">bug 810151</a> + <a title="Use fadvise() to speed up cookie db load" href="https://bugzilla.mozilla.org/show_bug.cgi?id=810454">bug 810454</a> - Aaron Klotz implemented omnijar + cookie readahead.</p>

<p><a title="Fold NSPR and NSS into mozjs (for Windows) or libxul (for other platforms)" href="https://bugzilla.mozilla.org/show_bug.cgi?id=648407">bug 648407</a> - Mike Hommey folded libraries for faster startup. If I&#8217;m reading <a title="Update removed-files after bug 648407" href="https://bugzilla.mozilla.org/show_bug.cgi?id=852068">bug 852068</a> correctly, Firefox now loads 7 fewer libraries on startup. My rough rule of thumb is that each (small) file adds ~30ms to spinning-disk startup so this should net >200ms in startup savings.</p>

<p>Cumulative startup improvements are notoriously difficult to predict + measure, but I suspect that above changes should make for a >=10% speedup in Firefox 22 start over previous releases. We&#8217;ll be watching telemetry data in the coming weeks.</p>

<h3>Smoothness</h3>

<p><a title="Consider getting rid of the delay line filter stuff in timer thread" href="https://bugzilla.mozilla.org/show_bug.cgi?id=590422">bug 590422</a> - Avi Halachmi is continuing on his quest to make Firefox animate smoothly. This is another tricky step towards smoother animations in Firefox. Since landing this, Avi already embarked on the next gecko-level animation smoothness improvement.</p>

<p>Marco Bonardo spotted some potential for contention in recent DOM Local Storage optimizations. Vladan Djeric landed corrections in <a title="LocalStorage performance improvements" href="https://bugzilla.mozilla.org/show_bug.cgi?id=842852">bug 842852</a>.</p>

<h3>Throughput improvements</h3>

<p>Ehsan Akhgari reduced allocator contention in <a title="Prevent firing timers from lock contention with the main thread" href="https://bugzilla.mozilla.org/show_bug.cgi?id=733277">bug 733277</a>.</p>

<p>Tim Taubert taught Firefox to warm up newtab connections on hover <a title="[New Tab Page] Speculatively open connections for sites when hovering them" href="https://bugzilla.mozilla.org/show_bug.cgi?id=790882">bug 790882</a></p>
]]></content>
  </entry>
  
  
  
  <entry>
    <title type="html"><![CDATA[Blogging with Octopress]]></title>
    <link href="http://taras.glek.net/blog/2013/03/11/living-with-octopress/"/>
    <updated>2013-03-11T16:58:00-07:00</updated>
    <id>http://taras.glek.net/blog/2013/03/11/living-with-octopress</id>
    <content type="html"><![CDATA[<p>A couple months ago I <a href="http://taras.glek.net/blog/2012/12/17/hello-octopress/">switched</a> to <a href="http://octopress.org">Octopress</a>. I now have some experience to share.</p>

<p>Overall, my Octopress + Github + Disqus experience has been much better blogger, wordpress and livejournal past before it. I only wish I kept my old posts in HTML instead of converting them to markdown. When I was setting up my blog, I did not know that Octopress could render HTML.</p>

<h4>RSS Bugs</h4>

<p>I learned not expect much from RSS. In addition to being hard to discover, the default category RSS is buggy. It interprets markdown twice <a href="https://github.com/imathis/octopress/issues/884#issuecomment-12178049">choking</a> on some exciting Telemetry links in my archives. I had to restort to writing a custom mozilla category feed.</p>

<p>The excerpt feature (<code>&lt;!-- more --&gt;</code>) does not work in RSS. To me that defeats the whole point of excerpts, who even reads blog homepages? I do not have time to fix this.</p>

<h4>It&#8217;s easy to make a mess</h4>

<p>I wanted to get rid of some octopress defaults like external CSS, external fonts, modify some layout. I found I could not restrict myself to only editing files in <code>_directories</code>. I think this means that switching to a new theme will be hard. I was lazy and ended up with my content in the same repo as the octopress source. I&#8217;ll have to clean up my act before I can share my customizations.</p>

<h4>Saving Time</h4>

<p>One of the worst parts about my old wordpress blog was the amount of UI one had to go through to create HTML links. My snappy updates have a lot of bugzilla links. I wrote an octopress extension to do most of the link work for me. Syntax looks like:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>{%Bug ####%}, {%bug ####%}</span></code></pre></td></tr></table></div></figure>


<p>If anyone is interested, you can download it <a href="http://people.mozilla.org/~tglek/bugzilla.rb">here</a> until I clean up my octopress git repository.</p>

<p>Overall I like Octopress and I recommend the octopress/github combo to every developer who is looking to setup a blog. It saves a lot of time and as long as one can deal with lack of unit testing and Ruby, it&#8217;s great.</p>
]]></content>
  </entry>
  
  
  
  <entry>
    <title type="html"><![CDATA[Snappy #52]]></title>
    <link href="http://taras.glek.net/blog/2013/03/08/snappy-number-52/"/>
    <updated>2013-03-08T16:58:00-08:00</updated>
    <id>http://taras.glek.net/blog/2013/03/08/snappy-number-52</id>
    <content type="html"><![CDATA[<h3>Frontend</h3>

<h4>Help-Wanted:</h4>

<p>Avi Halachmi <a href="http://avih.github.com/blog/2013/02/28/slow-touchpad-scroll-in-firefox/">needs your help</a> comparing scrolling behavior between browsers.</p>

<h4>Australis</h4>

<p>Mike Conley <a href="http://mikeconley.ca/blog/2013/03/01/australis-curvy-tabs-more-progress/">blogged</a> that Australis performance is now on-par with current theme on low-end hardware.</p>

<h3>Startup</h3>

<p>Aaron Klotz landed <a title="Generic readahead functions" href="https://bugzilla.mozilla.org/show_bug.cgi?id=845907">bug 845907</a>. This gives us a consistent way to warm IO caches. This functionality can easily backfire if we end preloading data that does not get used. Uses of readahead should always be accompanied with telemetry to verify it performs as expected. <a title="Use fadvise() to speed up cookie db load" href="https://bugzilla.mozilla.org/show_bug.cgi?id=810454">Bug 810454</a> is the first user of readahead API, it landed with A/B testing telemetry.
Omnijar readhead is next, in <a title="Use readahead for ordered jar files such as omni.ja. Should be ~10% startup speedup" href="https://bugzilla.mozilla.org/show_bug.cgi?id=810151">bug 810151</a>. It results in ~60% drop in omni.ja startup read time on Windows on Aaron&#8217;s machine.</p>
]]></content>
  </entry>
  
  
  
  <entry>
    <title type="html"><![CDATA[Snappy #51: Smoothing Tab Animations]]></title>
    <link href="http://taras.glek.net/blog/2013/02/22/snappy-number-51-smoothing-tab-animations/"/>
    <updated>2013-02-22T16:14:00-08:00</updated>
    <id>http://taras.glek.net/blog/2013/02/22/snappy-number-51-smoothing-tab-animations</id>
    <content type="html"><![CDATA[<h3>Lack of Updates</h3>

<p>I skipped a Snappy update two-weeks ago (did anyone notice?) due to not having any completed work to report. Snappy has not stagnated, we have big projects inflight see this week&#8217;s <a href="https://wiki.mozilla.org/Performance/Snappy/2013-02-21">notes</a> for some details.</p>

<h3>Tab Smoothness</h3>

<p>I usually do not cover in-flight work in Snappy updates and expect individual developers to blog about stuff they are working on. However, Avi Halachmi has delayed blogging to focus on quickly advancing Firefox performance, an exception had to me made.</p>

<p>Avi has been investigating tab smoothness since December. His approach relies on detailed instrumentation + sending captured data via Telemetry. This culminated in some exciting bug activity this week:</p>

<ul>
<li><a title="Add telemetry probes for tab animation smoothness" href="https://bugzilla.mozilla.org/show_bug.cgi?id=828097">bug 828097</a> According to Telemetry, Firefox tab animations are quite smooth (due to recent improvements like <a title="requestAnimationFrame generates too short/long frames, especially at the beginning of animation" href="https://bugzilla.mozilla.org/show_bug.cgi?id=731974">bug 731974</a>) iff one has the newtab thumbnail feature disabled (via button in top right of the page).</li>
<li><a title="Newtab page slows down tab-open animation" href="https://bugzilla.mozilla.org/show_bug.cgi?id=843853">bug 843853</a> was filed to fix above performance hit ASAP.</li>
<li><a title="Cache GradientStops instead of gfxPatterns" href="https://bugzilla.mozilla.org/show_bug.cgi?id=838758">bug 838758</a> 20-25% tab animation speedup on Direct2D-accelerated systems.</li>
<li><a title="Refresh driver may re-target the same timestamp" href="https://bugzilla.mozilla.org/show_bug.cgi?id=842967">bug 842967</a>, <a title="Consider getting rid of the delay line filter stuff in timer thread" href="https://bugzilla.mozilla.org/show_bug.cgi?id=590422">bug 590422</a> improve animation scheduling.</li>
</ul>


<p>Due to web-like Firefox UI architecture most of these improvements will enable smoother website perf.</p>

<p>Avi, Matthew Noorenberghe, Mike Conley are working on optimizing our next UI refresh: Australis. Australis is shaping up to be the most perf-tuned theme update we&#8217;ve done. See <a title="Australis tabs performance tracking" href="https://bugzilla.mozilla.org/show_bug.cgi?id=837885">bug 837885</a> for how performance is being tracked.</p>

<p>As Avi&#8217;s manager I found it trying to see weeks of perf-reporting work with no fixes to accompany it. I&#8217;m happy to see this investigation investment pay off and serve an example of importance of methodically studying performance before proceeding to optimization.</p>
]]></content>
  </entry>
  
  
  
  
  
  
  
  <entry>
    <title type="html"><![CDATA[Plugin Hang UI On Aurora]]></title>
    <link href="http://taras.glek.net/blog/2013/02/15/plugin-hang-ui-on-aurora/"/>
    <updated>2013-02-15T16:51:00-08:00</updated>
    <id>http://taras.glek.net/blog/2013/02/15/plugin-hang-ui-on-aurora</id>
    <content type="html"><![CDATA[<p>Aaron wrote a <a href="http://dblohm7.ca/blog/2013/02/15/plugin-hang-ui-on-aurora/">great post</a> on of the new plugin killer UI and Windows magic involved in debugging it.</p>

<p>We need help testing the new functionality, please see the link above for details.</p>

<p>Unfortunately, we are still waiting on <a title="Add Aaron Klotz's blog to Planet Mozilla" href="https://bugzilla.mozilla.org/show_bug.cgi?id=814095">bug 814095</a> to get his blog syndicated to planet.</p>
]]></content>
  </entry>
  
  
  
  <entry>
    <title type="html"><![CDATA[Is Planet Mozilla Obsolete for Technical Content?]]></title>
    <link href="http://taras.glek.net/blog/2013/02/15/is-planet-mozilla-obsolete/"/>
    <updated>2013-02-15T11:21:00-08:00</updated>
    <id>http://taras.glek.net/blog/2013/02/15/is-planet-mozilla-obsolete</id>
    <content type="html"><![CDATA[<h2>Good Old Days</h2>

<p>I have been remotely working at Mozilla for over 6 years. I like working remotely, but it poses some challenges. Early on I discovered that if I only show up at the HQ a couple times a year, most will people treat me as a stranger. That got old fast.</p>

<p>The problem is that it takes a lot of time time to get everybody up to speed on who you are (defined by what you work on). This means one&#8217;s work social circle is limited to people who you have frequent bugzilla/irc interactions with + random people who took the time to get to know a random coworker. One can imagine that introverts are not inclined to waste too much energy meeting new people.</p>

<p>The solution was simple: blog a lot. After a couple years of blogging I just had to say &#8220;I&#8217;m Taras&#8221; and a good proportion of the people would connect my face to (obscure static analysis at first) work they read about on <a href="http://planet.mozilla.org">planet</a>. This cut down my introduction overhead significantly. Planet Mozilla had a lot of blogs syndicated to it when I joined. I had a huge audience to introduce my work to.</p>

<p>In addition to creating awareness of my work, blogging about tough problems would occasionally result in helpful comments. People provided tips on static analysis, Windows APIs and even ran scary privileged software I wrote to help me gather data. Due to disproportionate (eg saving days to weeks of work) value of helpful comments I concluded that it&#8217;s worth spending a couple hours per blog post. Most blog comments might be <a href="http://davidwalsh.name/blog-comments">garbage</a>, but they are easy to ignore. Before I implemented <a href="https://wiki.mozilla.org/Telemetry">telemetry</a>, I was able to find performance extremes solely on blog feedback. Unlike privacy-sensitive telemetry data, blog comments came with email addresses and eager volunteers on the other end. I value comments a lot, it makes me sad when good bloggers disable comments.</p>

<p>To me Planet Mozilla was a great way to keep up with Mozilla technical affairs. We have a lot of smart people working on interesting problems at Mozilla. As a result of past planet experience, I ask every new person who joins the Performance team to get their blog syndicated to planet ASAP. Increasingly that feels like an unproductive suggestion.</p>

<h2>Present</h2>

<p>I do not have any data on this. However my feeling is that the volume of blog traffic on planet grew from barely-manageable in the early days to too much. Good technical content never constituted more than 10% of the planet posts. However as absolute blog traffic grew, it became harder to spot the good stuff. In addition to a lot of content being non-technical, in the last few years people started discussing their feelings about others and things got ugly.</p>

<p>I&#8217;m pretty sure the result is that there are fewer technical people reading planet than before(due to poor signal/noise ratio). Lack of audience means less incentive to blog (that and the fact that some bloggers are part of the audience that gave up on planet).</p>

<p>So what are we to do? Is planet obsolete for good technical content? Is there a new reddit/hackernews/twitter self-moderating solution for dealing with signal problems? Surely setting up a new planet is no longer considered state of the art for this.</p>

<p>I am sad to see a public resource like the planet get too big to remain useful with no clear successor.</p>

<p>ps. Sorry for adding to the non-technical noise.</p>
]]></content>
  </entry>
  
  
  
  <entry>
    <title type="html"><![CDATA[Snappy #50]]></title>
    <link href="http://taras.glek.net/blog/2013/01/28/snappy-number-50-misc-speedups/"/>
    <updated>2013-01-28T16:00:00-08:00</updated>
    <id>http://taras.glek.net/blog/2013/01/28/snappy-number-50-misc-speedups</id>
    <content type="html"><![CDATA[<h3>Graphics</h3>

<p>In some cases Direct2D-accelerated drawing is slower than the non-accelerated path. Jeff Muizelaar fixed a severe gradient &#8216;hang&#8217; in <a title="Avoid hitting D2D slow path when drawing radial gradients from css" href="https://bugzilla.mozilla.org/show_bug.cgi?id=823147">bug 823147</a>.</p>

<p>Avi Halachmi diagnosed a significant menu performance issue in <a title="Menu items slow to paint/respond after peeking their sub-menu popups" href="https://bugzilla.mozilla.org/show_bug.cgi?id=832641">bug 832641</a>, this was promptly fixed by Matt Woodrow.</p>

<h3>Misc Pauses</h3>

<p>Vladan Djeric <a href="https://blog.mozilla.org/vdjeric/2013/01/24/add-on-performance-problems/">blogged</a> about top main-thread SQL issues contributed by addons. Vladan also produced a <a href="http://people.mozilla.com/~vdjeric/DecJanHangs.txt">chromehang</a> report for last 2 months.</p>

<p>Ehsan Akhgari fixed a <em>chromehang</em> caused by leftover debug code: <a title="Multi-second hang during CollectNewLoadedModules" href="https://bugzilla.mozilla.org/show_bug.cgi?id=830765">bug 830765</a>.</p>

<p>Justin Lebar fixed an issue where telemetry memory reporting code was accidentally triggering expensive &#8216;release memory to OS&#8217; operations: <a title="Extremely long pause while collecting telemetry information on the main thread" href="https://bugzilla.mozilla.org/show_bug.cgi?id=789975">bug 789975</a>.</p>

<h3>Shutdown</h3>

<p>Sometimes Firefox takes a long time to shutdown. We also have a timer that regularly triggers cycle collection. Olli Pettay disabled this timer during shutdown in <a title="Timer based CC occurring on shutdown" href="https://bugzilla.mozilla.org/show_bug.cgi?id=822849">bug 822849</a>.</p>
]]></content>
  </entry>
  
  
  
  
  
  <entry>
    <title type="html"><![CDATA[Snappy #48: Now With Faster Shutdown]]></title>
    <link href="http://taras.glek.net/blog/2013/01/10/snappy-number-48-now-with-faster-shutdown/"/>
    <updated>2013-01-10T16:53:00-08:00</updated>
    <id>http://taras.glek.net/blog/2013/01/10/snappy-number-48-now-with-faster-shutdown</id>
    <content type="html"><![CDATA[<h3>Huge Shutdown Improvement</h3>

<p>After a couple weeks worth of telemetry data confirmed that Olli Pettay sped up shutdown by an epic >=30%: <a title="Don't run CC during shutdown" href="https://bugzilla.mozilla.org/show_bug.cgi?id=818739">bug 818739</a>, <a href="http://tinyurl.com/abo6uek">telemetry link</a>.</p>

<h3>Memory Management</h3>

<p>Olli and Andrew McCreight continued with reducing CC pauses:</p>

<ul>
<li><a title="Try to postpone triggering CC if we're in middle of GC handling" href="https://bugzilla.mozilla.org/show_bug.cgi?id=820378">bug 820378</a>: Delay CC if we&#8217;re in the middle of a GC, to allow async CC prep</li>
<li><a title="Improve CanSkipWrappedJS" href="https://bugzilla.mozilla.org/show_bug.cgi?id=827471">bug 827471</a>: Remove more wrapped JS from the CC graph</li>
<li><a title="[CC] don't add JSContexts that have no children to the cycle collector graph" href="https://bugzilla.mozilla.org/show_bug.cgi?id=705371">bug 705371</a>: Remove pointless JSContexts from the CC graph</li>
<li><a title="Mark the script of live nsXULPrototypeScript black during GC" href="https://bugzilla.mozilla.org/show_bug.cgi?id=785493">bug 785493</a>: Reduce size of steady state cycle collector graph by about 80%</li>
<li><a title="Add telemetry for prep work done for cycle collection" href="https://bugzilla.mozilla.org/show_bug.cgi?id=821371">bug 821371</a>: Include prep work in cycle collector pause time telemetry</li>
</ul>


<h3>Misc</h3>

<p>Vladan landed <a title="Move LocalStorage writes off the main thread" href="https://bugzilla.mozilla.org/show_bug.cgi?id=807021">bug 807021</a>. Firefox should now handle DOM Local Storage writes without janking.</p>

<h3>Startup</h3>

<p>David Teller made search service metadata loading/migration async: <a title="nsIBrowserSearchService should load metadata asynchronously" href="https://bugzilla.mozilla.org/show_bug.cgi?id=760036">bug 760036</a>. David also made session-store loading async: <a title="session file should be read on a background thread" href="https://bugzilla.mozilla.org/show_bug.cgi?id=532150">bug 532150</a>.</p>

<p>Aaron Klotz landed a telemetry probe to measure how often the &#8216;Firefox is running but not responding&#8217; dialog is encountered on attempted startup: <a title="telemetry on what proportion of attempted firefox startups result in 'firefox is running and not responding'" href="https://bugzilla.mozilla.org/show_bug.cgi?id=815418">bug 815418</a>. This will help us decide on whether (or when) to add functionality to kill unresponsive Firefox instances.</p>
]]></content>
  </entry>
  
  
  
  <entry>
    <title type="html"><![CDATA[Snappy: 2012 Summary]]></title>
    <link href="http://taras.glek.net/blog/2013/01/04/snappy-2012-summary/"/>
    <updated>2013-01-04T15:46:00-08:00</updated>
    <id>http://taras.glek.net/blog/2013/01/04/snappy-2012-summary</id>
    <content type="html"><![CDATA[<p>2012 was an exciting year for Snappy. Turning &#8216;make it go faster&#8217; into a set of measurements and corresponding bugs to fix was hard. We learned a lot.</p>

<p>I&#8217;d like to summarize some of the most memorable Snappy accomplishments.</p>

<p><em>Short version: Firefox is much more reponsive now.</em></p>

<!-- more -->


<h1>Snappy Tools</h1>

<p>Much of the year was spent on tooling for analyzing Firefox performance. <a href="https://addons.mozilla.org/en-us/thunderbird/addon/gecko-profiler/">Gecko profiler</a> is my favourite new tool. Telemetry chromehangs, evolution and slowsql are also great for settling arguments.</p>

<p>Many of the bugs below would not have gotten fixed without these tools.</p>

<h1>Cleaning up the Memory Collectors</h1>

<p>In the beginning of the year it was common to suffer long (200-700ms for me) garbage and cycle collection pauses. I now rarely see pauses over 20ms in these areas. I suspect these were the most laborious improvements of 2012: see the huge number of blocking bugs in <a title="Incremental GC" href="https://bugzilla.mozilla.org/show_bug.cgi?id=641025">bug 641025</a>, <a title="[meta] Don't add obviously live objects to the cycle collector graph" href="https://bugzilla.mozilla.org/show_bug.cgi?id=716598">bug 716598</a>.</p>

<h1>SQLite Misuse</h1>

<p>SQLite is a fine database, but it is much better at storing data robustly than accessing it efficiently. Firefox got nailed by the following footguns:</p>

<ul>
<li>overusing main-thread SQL queries</li>
<li>performing expensive background queries</li>
</ul>


<p>As if main-thread IO wasn&#8217;t bad enough, turns out SQLite does not like running queries in parallel. Mixing sync/async queries invites race conditions where sync queries can end up waiting for many minutes at a time (hanging the UI) while &#8220;background&#8221; maintenance queries complete. There were too many such fixes to list.</p>

<h3>DOM Local Storage Caching</h3>

<p>We ran into significant problems with Local Storage. In order conform to spec and not perform poorly, browsers are forced to maintain an in-memory cache (this is why Local Storage dominates in synthetic benchmarks: they are measuring memory bandwidth with no syscall, etc overhead).</p>

<ul>
<li>It became really popular in 2011-2012 despite a poor spec: main-thread reads and vagueness on when/whether data should hit disk.</li>
<li>Local Storage cache was causing LS to be written out too often: <a title="Reduce writes in current DOM Storage implementation" href="https://bugzilla.mozilla.org/show_bug.cgi?id=714964">bug 714964</a></li>
<li>Local Storage cache was written on main-thread. For paranoid amusement it was then read back in after every writeout: <a title="Move LocalStorage writes off the main thread" href="https://bugzilla.mozilla.org/show_bug.cgi?id=807021">bug 807021</a></li>
<li>For some some reason to do with how our DOM works there is a second level of caching so local storage can actually use up 2x more memory in RAM than it does on disk. As a result the Local Storage cache is slated for a complete rewrite in <a title="Rewrite and cleanup DOMStorage code" href="https://bugzilla.mozilla.org/show_bug.cgi?id=600307">bug 600307</a>.</li>
</ul>


<p>I should note, I made a mistake and attributed <a href="http://taras.glek.net/blog/2012/02/22/psa-dom-local-storage-considered-harmful/">too much blame</a> to the Local Storage API. I will blog on the exact extent of Local Storage badness once I have a chance to access the relevant telemetry data.</p>

<p>Surprisingly, the Local Storage caching layer was so bad that the underlying SQLite footguns did not get to play a role in this tragedy.</p>

<h1>Async IO</h1>

<p>For years people would argue on how patches should strive to use async APIs during patch review. Unfortunately even a little bit of sync IO has potential to cancel out the most elaborate async efforts.</p>

<p>We had no purely async storage APIs until recently. We now have one such API in <a href="http://dutherenverseauborddelatable.wordpress.com/2012/10/03/asynchronous-file-io-for-the-mozilla-platform/">OS.File</a>.</p>

<h1>UI Slowness</h1>

<p>The following sadness was fixed:</p>

<h3>Startup</h3>

<ul>
<li>Renaming directories with lots of files can take minutes on Windows: bad when it happens on startup: <a title="Disk cache seems to cause exceptionally slow startups(1min+)" href="https://bugzilla.mozilla.org/show_bug.cgi?id=701909">bug 701909</a>.</li>
<li>Firefox had a minor tendency to start loading webpages before UI is shown: <a title="Don't load homepage URI before first paint" href="https://bugzilla.mozilla.org/show_bug.cgi?id=756313">bug 756313</a>, <a title="Wait until chrome is painted before executing code not critical to making the initial window visible" href="https://bugzilla.mozilla.org/show_bug.cgi?id=715402">bug 715402</a>.</li>
<li>Q: What could be worse than loading pages before UI is shown? A: Executing synchronous proxy code: <a title="windows proxy discovery via WPAD needs caching" href="https://bugzilla.mozilla.org/show_bug.cgi?id=790370">bug 790370</a>, <a title="remove synchronous DNS resolution in nsSOCKSIOLayer.cpp" href="https://bugzilla.mozilla.org/show_bug.cgi?id=767159">bug 767159</a></li>
<li>Firefox insisted on doing network activity to verify some extension jars on startup: <a title="Certificate of a signed extension is validated on each startup" href="https://bugzilla.mozilla.org/show_bug.cgi?id=726125">bug 726125</a></li>
</ul>


<h3>General</h3>

<ul>
<li>Tab switching to some popular websites is roughly 10x faster now (too many bugs to list).</li>
<li>Firefox tended be unresponsive during large downloads: <a title="nsExternalAppHandler downloads files on the main thread" href="https://bugzilla.mozilla.org/show_bug.cgi?id=789932">bug 789932</a>.</li>
<li>In some situations hardware acceleration would slow down Firefox UI to a crawl: too many bugs to list here.</li>
</ul>


<h1>2013</h1>

<p>2012 was a good warm-up. We spent a substantial part of the year on tooling. If everything goes right, that should pay off in the coming year.</p>
]]></content>
  </entry>
  
  
  
  <entry>
    <title type="html"><![CDATA[Making pages load faster]]></title>
    <link href="http://taras.glek.net/blog/2012/12/24/making-pages-load-faster/"/>
    <updated>2012-12-24T21:44:00-08:00</updated>
    <id>http://taras.glek.net/blog/2012/12/24/making-pages-load-faster</id>
    <content type="html"><![CDATA[<p>I am not a web developer. I often learn about modern web dev tricks/trends by noticing how they impact overall Firefox performance. I prefer learning about perf topics from well-written blog posts. Bryan of Google page speed team <a href="http://calendar.perfplanet.com/2012/make-your-mobile-pages-render-in-under-one-second/">blogged</a> on optimizing pageload speeds on mobile. The advice is good, but I have two minor warnings about it.</p>

<p>Suggestion to use <code>requestAnimationFrame</code> to delay loading resources is a good one. There is a gotcha: if you do something expensive in the requestAnimationFrame handler, it&#8217;ll delay your first page draw (requestAnimationFrame fires as the browser prepares to paint. It&#8217;s an ok place to start network requests, etc). If you do something expensive, use a chained requestAnimationFrame. Firefox recently started using a similar trick to display the UI faster in <a title="Wait until chrome is painted before executing code not critical to making the initial window visible" href="https://bugzilla.mozilla.org/show_bug.cgi?id=715402">bug 715402</a>.</p>

<p>The suggestion to split up stylesheets is also good, but risky. I&#8217;ve seen this before, but I did not understand why websites sprinkled <code>&lt;link rel="stylesheet"&gt;</code> throughout the page bodies. This can significantly degrade pageload times by causing redundant page restyles and reflows. Reflows can take hundreds of milliseconds on slow mobile devices, doing them multiple times is bad. Make sure to run your pages through a <a href="http://anton.kovalyov.net/2012/12/17/firefox-profiler/">profiler</a> (or time the difference between relevant requestAnimationFrame callbacks). I saw a bad case of this in <a title="huffingtonpost loads up to 50% slower in Firefox than in opera" href="https://bugzilla.mozilla.org/show_bug.cgi?id=718864">bug 718864</a>.</p>
]]></content>
  </entry>
  
  
  
  <entry>
    <title type="html"><![CDATA[Snappy #45: The view from home]]></title>
    <link href="http://taras.glek.net/blog/2012/12/21/interesting-bugzilla-activity/"/>
    <updated>2012-12-21T12:09:00-08:00</updated>
    <id>http://taras.glek.net/blog/2012/12/21/interesting-bugzilla-activity</id>
    <content type="html"><![CDATA[<p>I&#8217;m out until January. However, I setup a <a href="http://taras.glek.net/blog/2012/12/17/hello-octopress/">new blog</a>, so why not test it with a snappy update.</p>

<p>Benoit Girard sped up shutdown with:</p>

<ul>
<li>not forcing startup cache flushes on shutdown: <a title="[Shutdown] Startup cache slows shutdown with < 10 sec uptime" href="https://bugzilla.mozilla.org/show_bug.cgi?id=816656">bug 816656</a>. This speeds up exiting browser soon after startup.</li>
<li><a title="[Shutdown] js::NukeCrossCompartmentWrappers takes up to 300ms on shutdown. Avoid doing it for optimized shutdown" href="https://bugzilla.mozilla.org/show_bug.cgi?id=818296">bug 818296</a>: [Shutdown] js::NukeCrossCompartmentWrappers takes up to 300ms on shutdown. Avoid doing it for optimized shutdown. This may significantly reduce our shutdown times. We are waiting on more telemetry data to confirm.</li>
</ul>


<p>Aaron Klotz made startup slightly faster by speeding up reading of some urlclassifier files in <a title="loading the two safebrowsing files is not as fast as it could be" href="https://bugzilla.mozilla.org/show_bug.cgi?id=810101">bug 810101</a>.</p>

<p>Vladimir Vukicevic landed <a title="requestAnimationFrame generates too short/long frames, especially at the beginning of animation" href="https://bugzilla.mozilla.org/show_bug.cgi?id=731974">bug 731974</a> which results in smoother browser animations and significantly improves the quality of tab-strip animations.</p>
]]></content>
  </entry>
  
  
  
  
  
  <entry>
    <title type="html"><![CDATA[Coping with Flash hangs]]></title>
    <link href="http://taras.glek.net/blog/2012/11/26/coping-with-flash-hangs/"/>
    <updated>2012-11-26T01:45:11-08:00</updated>
    <id>http://taras.glek.net/blog/2012/11/26/coping-with-flash-hangs</id>
    <content type="html"><![CDATA[<p>Blocking calls into the Flash plugin can temporarily hang Firefox. This is a problem because sometimes the user would be happy to kill the plugin to access their webpage and at other times it&#8217;s the only way to get certain flash apps/games to load. If you suffer from flash-related hangs see Aaron&#8217;s <a href="http://dblohm7.ca/blog/2012/11/22/plugin-hang-user-interface-for-firefox/">blog post</a> for some builds to try. He is working a new <a href="https://wiki.mozilla.org/Features/Firefox/Windows_Plugin_Hang_UI">feature </a>to provide an option to kill hanging flash instances.</p>
]]></content>
  </entry>
  
  
  
  <entry>
    <title type="html"><![CDATA[Snappy #44: Fixing tab switching in Vancouver]]></title>
    <link href="http://taras.glek.net/blog/2012/11/16/snappy-44-fixing-tab-switching-in-vancouver/"/>
    <updated>2012-11-16T10:06:41-08:00</updated>
    <id>http://taras.glek.net/blog/2012/11/16/snappy-44-fixing-tab-switching-in-vancouver</id>
    <content type="html"><![CDATA[<p>I joined our GFX+Layout teams for a workweek in Vancouver. Since profiling is most effective on slow machines, I brought along my trusty Acer  Aspire 722(slow 1.3ghz  CPU+ fast GPU) as my primary laptop. This hardware is great because the combination of a weak CPU + decent GPU means that if we accelerate things right the browser can perform quite well and if we don&#8217;t, things get really slow. (analogous situation exists when fast CPUs are matched with slow GPUs).</p>

<p>In the beginning of the week I quickly demoed menu lag, slow gmail tab switching(<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=811472">811472</a>). Later in the week we looked at problematic Facebook tab switch times (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=811474">811474</a>), Australis(see Matt&#8217;s <a href="http://matthew.noorenberghe.com/blog/2012/11/australis-tabs-where-are-you">post</a>) performance. By the end of the week tab switching improved by over 2x for both facebook and gmail. I don&#8217;t have exact figures because while we can measure general tab switch trends via telemetry, there isn&#8217;t a convenient way to do it on individual browsers yet. <em>Help wanted:</em> would be great if someone could do up a barebone addon to monitor tab switching in bug <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=812381">812381</a>, we&#8217;ll fill in the rest.</p>

<p>Jeff Muizelaar started out by speeding up checkbox drawing in bug <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=809603">809603</a><strong>.</strong> Matt Woodrow sped up gmail by tweaking how we use layers in bugs <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=811927">811927</a>,  <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=811570">811570</a>.</p>

<p>Matt made sure that we no longer draw layers with opacity of 0 in bug <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=811831">811831</a>. Turns rendering lots of invisible text can be expensive.</p>

<p>Workweeks are a more about communication than getting code landed, so it is impressive that Jeff, Matt and their reviewers managed to diagnose, fix, review, land such significant optimizations in a couple of days. My laptop of pain feels much faster already.</p>

<p>In the coming weeks expect to see smoother tab switching, smoother animations, lower profiling overhead as we work through issues discussed during the workweek.</p>
]]></content>
  </entry>
  
  
</feed>
