Quantum Flow Engineering Newsletter #13

Hi everyone,

I'm back with some more updates on another week worth of work on improving
various performance aspects of Firefox.

Similar to the past weeks, Speedometer remains a big focus area for
performance work.  In addition to the many already
<https://bugzilla.mozilla.org/show_bug.cgi?id=3D1339557> identified
<https://bugzilla.mozilla.org/show_bug.cgi?id=3D1245279> bugs to work on, w=
e
are also still measuring the benchmark quite actively looking for more
optimization opportunities.

Another item worthy of an update is Background Hang Reports.  Michael
Layzell earlier today enabled collection of native stack traces on Win64
<https://bugzilla.mozilla.org/show_bug.cgi?id=3D1357829> (and Mac) using th=
e
Gecko Profiler stack walking backend (Linux support
<https://bugzilla.mozilla.org/show_bug.cgi?id=3D1365309> soon to follow).
Because we are now using the Gecko Profiler backend for BHR, we can soon
get interleaved native and pseudo-stacks
<https://bugzilla.mozilla.org/show_bug.cgi?id=3D1367406> from BHR similar t=
o
the ones that we have come to know and love in Gecko Profiler for a long
time now!  Also, Doug Thayer has made a lot of progress on hangs.html
<https://squarewave.github.io/>, his front-end for exploring the native
stack traces uploaded from BHR.  This is a nice and super fast tool to
explore the hangs that our users are experiencing on the Nightly channel
and it shows you the corresponding pseudo-stacks that are extremely helpful
if for example the hang is coming from chrome-privileged JS (where we get
full call stack information through telemetry).  Please have a look, and se=
nd
him feedback <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1344003>.

This edition is exceptionally short, but the most interesting part of these
is probably the last part anyway, the credits section, where I acknowledge
the hard work of the people who worked on improving the performance of
Firefox in the past week.  So let's get to that, and I do hope I'm not
dropping any names:

   - D=C3=A3o Gottwald made it so that XUL scrollboxes don=E2=80=99t always=
 cause a
   style flush <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1371620> whe=
n
   checking if it can scroll to an element.
   - Junior Hsu got rid of some main thread IO
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D867798> that we do when
   closing the DB connection to the cookies database.  This helps with star=
tup
   performance.
   - Florian Qu=C3=A8ze deferred the construction and initialization of som=
e
   search components <https://bugzilla.mozilla.org/show_bug.cgi?id=3D136970=
5>,
   UnifiedComplete <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1371603>=
(for
   the AwesomeBar), and the sidebar browser
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1369751> until after fir=
st
   paint, which should all help to improve start-up speed.  Similarly
he deferred
   the initialization of Places to after first paint
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1371710>.
Additionally he sped
   up the appearance of the about:home search bar placeholder text
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1371860> which is the la=
st
   part of painting the initial UI in a new browser profile.  He also made
   GetShellFolderPath() call the correct Windows API and making startup
   quite a bit faster
   <https://treeherder.mozilla.org/perf.html#/alerts?id=3D7261> as a result=
..
   - David Baron made it so that we cache font lookups on Windows
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1371157>! Among other
   things, this should help speed up rendering long <select> dropdowns with
   e10s enabled.
   - Wei-Cheng Pan made it so that updating Windows =E2=80=9Cjump lists=E2=
=80=9D
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1354143> no longer cause=
s
   main thread IO!
   - Robert Strong removed nsWindowsShellService's ShortcutMaintenance
   method <https://bugzilla.mozilla.org/show_bug.cgi?id=3D692295> which was
   slow during first startup, and no longer needed.
   - Andrea Marchesini delayed initialization of the
   ContextualIdentityService module
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1369761> until after fir=
st
   paint
   - Stephen A Pohl made GMPInstallManager extract GMP plugins off main
   thread <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1149732>
   - Gabor Krizsanits made it so that short lived content processes are
   cached and re-used <https://bugzilla.mozilla.org/show_bug.cgi?id=3D13648=
49>,
   which caused some nice performance wins
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1364849#c17> on some of
   our benchmarks.
   - Milan Sreckovic made it so that the prefs file is written to off of
   the main thread <https://bugzilla.mozilla.org/show_bug.cgi?id=3D789945>!
   - Michael Layzell enabled reporting of native stack traces to BHR on
   Win64 <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1357829> thanks to
   David Major's help in avoiding a deadlock issue
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1372375>.  He also
fixed a recent
   performance regression
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1367458> caused by addin=
g
   a telemetry probe.  He furthermore enabled loading pages opened from
   rel=3Dnoopener links in a new process
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1370971> (while some fol=
low-up
   work <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1372662> is in the
   process of landing).  This is important to enable us to leverage multi-e=
10s
   better if sites opt into using this feature.
   - Olli Pettay moved GC and CC slices plus forgetSkippable phase to the
   idle queue <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1367905>.  Th=
is
   is a huge part of the cleanup work that Gecko needs to regularly run as
   pages keep running, and in the old world is could interfere with more
   important work such as processing an input event or a timeout handler, a=
nd
   now it runs with a lower priority!
   - Kyle Machulis removed the dependency of PluginProvider.jsm on NSS
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1370832> which caused
   startup slowdown.
   - Mats Palmgren lifted up the nsClassHashtable::LookupForAdd() API into
   nsBaseHashtable <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1371094>=
..
   This API allows you to look up something inside a hashtable, and insert =
a
   new entry with that key if the lookup doesn't find something without
   incurring two lookups.  He then followed
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1372022> up
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1372025> with
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1372048> a
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1372049> whole
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1372262> bunch
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1372274> of
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1372323> fixes
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1372327> to
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1372342> various
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1372349> code
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1372368> which
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1372008> could
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1372007> use
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1371952> this new more
   efficient API.  (Please consider using it for this use case as well!)  O=
h,
   and he also fixed the original bug
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1371095> which was the
   inspiration for all of this impressive work!
   - Evelyn Hung relanded her improvements for spell checker heuristics for
   a multi-process browser
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1354641> after fixing th=
e
   existing bug in the spell checker code
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1362858> which got her
   patch backed out previously.
   - Nicholas Nethercote enabled using PROFILER_LABEL macros outside of
   libxul <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1370329>.  This
   allows profiles that show jank caused by expensive DLL loads to include =
the
   name of the DLL being loaded.
   - Jon Coppeard parallelised the start of GC marking phase
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1369748>.
   - Jan de Mooij made string matching faster
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1371215>.  He also made
   some specific improvements to the performance of String.replace()
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1371097> that helps with
   rope <https://en.wikipedia.org/wiki/Rope_(data_structure)> SpiderMonkey
   strings.
   - Masayuki Nakano made
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1369694> some
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1369695> improvements
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1369696> to the speed
   <https://bugzilla.mozilla.org/show_bug.cgi?id=3D1369697> of the
   WindowConstructor() function on Windows that is central to the performan=
ce
   of opening a new window!

Cheers,
--=20
Ehsan
0
Ehsan
6/16/2017 5:11:35 AM
mozilla.dev.platform 6064 articles. 0 followers. Post Follow

0 Replies
46 Views

Similar Articles

[PageSpeed] 27

Reply: