

Firefox OS: Tracking reflows and event loop lags - bpierre
http://paulrouget.com/e/fxoshud/

======
pekk
We could have used (and contributed momentum to!) already existing, open
source Linux-based components wrapped up in an existing mobile OS which has
already been deployed and shown working on several nice devices and is
extremely capable, allowing you to do essentially whatever you can do on a
computer (Maemo/Meego/Tizen/Sailfish family). In basically whatever language
you want. Because, it IS a computer using a real computer OS which, for those
who want it, allows all the control that a Linux computer allows to the user,
not just a crummy sandbox.

And also there would not be such fundamental performance issues to iron out
for several years before the platform became remotely suitable for human
consumption.

And we wouldn't be pointlessly fighting a two-front battle, not only against
iOS and Android etc., but also against every other concurrent attempt to bring
a real, uncrippled open source, stack to mobile phones.

But... nah... we have plenty of time... let's build an entire NEW, NIH-based
operating system!

And make sure that every function absolutely must be performed inside a web
browser, and depends on Javascript, but with lots of ad hoc new APIs that are
not otherwise applicable. Then we can work furiously to make it perform. And
everyone who wants to touch our platform is required to deal with the
incredible annoying pain of current Javascript web app development every time
they want to write anything at all, forever.

Welcome to the future, now you must rewrite every capability in Javascript
(one of the worst languages everyone has to use) even when there are already
high-quality implementations in other languages. We don't want those here.

Because we don't just think Javascript is handy due to browsers already
supporting it, as a matter of historical accident. We could have used
literally anything. We actually sat down and decided there wasn't one _single_
better language than Javascript to write a mobile OS in, and to require
everyone to use to access our platform. Not even languages which have been
used forever to make OSes, and mobile OSes. Not even a system which would
allow choice of languages. Only Javascript. Only our new app API that we just
came up with.

But give us a few years to implement acceptable FPS as a "feature" on our
phone operating system targeted at weak hardware.

~~~
ZeroGravitas
I thought the Maemo/Meego/Tizen/Sailfish family had all shifted towards HTML5
for apps?

------
frik

      Firefox OS will also support scrolling in a different 
      thread (async pan and zoom), which will make scrolling 
      possible even if the event loop is blocked.
    

That's a great news!

------
techwizrd
I found the video of how browser's compute the layout of page and reflow
elements accordingly really cool. Is there a setting I can flip to view this
in action on websites I am working on? I think it would be useful in debugging
page rendering performance.

~~~
jlongster
I think you're looking for "paintflashing". Open the Developer Toolbar
(shift+f2) and type "paintflashing on".

------
bob_loblaw
He says this is for FFOS 1.4+. When will this make its way to the public?
Mozilla Hacks has some directions on how to get 1.2 on your ZTE Open [1], but
I've seen nothing about 1.3 let alone 1.4.

[1] [https://hacks.mozilla.org/2014/01/upgrading-your-zte-open-
to...](https://hacks.mozilla.org/2014/01/upgrading-your-zte-open-to-
firefox-1-1-or-1-2-fastboot-enabled/)

~~~
zz1
"Now that we have our v1.0 behind us and we’re moving forward with even more
partners, we’re going to do our best to bring Firefox OS back into our
heartbeat and will make quarterly feature releases available to partners along
with six-weekly security updates for the previous two feature releases. As far
as I know, that’s the most aggressive mobile OS release strategy out there
(and may still require some tweaking)."

[https://blog.mozilla.org/futurereleases/2013/07/19/mozillas-...](https://blog.mozilla.org/futurereleases/2013/07/19/mozillas-
heartbeat-quarterly-firefox-os-releases/)

You have nonetheless to consider that is the manufacturer who holds
responsability for the avalaible images.

Firefox OS 1.1 was delivered by Mozilla on October 9th 2013.

[https://blog.mozilla.org/futurereleases/2013/10/09/firefox-o...](https://blog.mozilla.org/futurereleases/2013/10/09/firefox-
os-update-1-1-adds-new-features-performance-improvements-and-additional-
language-support/)

------
piyush_soni
That makes me wonder, how much code do Firefox OS and Firefox Browser have in
common? Was just thinking if some of the advances of the mobile OS world could
benefit the browser as well :).

~~~
fzzzy
They share the same renderer codebase, Gecko. You are correct that advances
for the OS benefit the browser, and vice versa.

~~~
kbrosnan
The async pan zoom controller (APZ/APZC) is only used on Firefox OS and the
former Firefox for Metro. The graphics team wrote something similar for
Firefox for Android (JPZC). At some point the plan is to use the APZ in other
products.

[https://wiki.mozilla.org/Platform/GFX/APZ](https://wiki.mozilla.org/Platform/GFX/APZ)

~~~
fzzzy
Yes, some specifics about the architecture, such as APZ and multiprocess
architecture, are currently Firefox OS only, but this is because of backwards
compatibility limitations with Firefox Desktop. Hopefully some day the desktop
browser can benefit from these as well.

------
stusmall
I haven't followed Firefox OS so this was a surprise to me. I noticed their
use of adb and logcat. From a platform perspective, how much is in common
between Firefox OS and android?

~~~
mbrubeck
Firefox OS uses sources based on Android repos for the HAL, the bionic libc,
some of the development tools (like "repo" and "adb"), and some other low-
level libraries. Firefox OS doesn't use the Dalvik Java VM or anything built
on top of it.

[https://developer.mozilla.org/en-
US/Firefox_OS/Platform/Gonk](https://developer.mozilla.org/en-
US/Firefox_OS/Platform/Gonk)

~~~
stusmall
Oh, wow. They are quite a bit different then. Thanks for the info!

