Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NGA update

45 views
Skip to first unread message

Francisco Jordano

unread,
Aug 11, 2015, 10:12:51 AM8/11/15
to dev-gaia
Hi folks,

past week some of us had the chance to meet in Paris to boost the efforts that we are doing around NGA.

The main objective for this week was to deal with a proper navigation for the apps that right now are separated in different documents. As well as having a clear plan for the 2.5 release around what parts of NGA are effective, which ones need to improve, etc.

The work done has been remarkable, personally I was missing those weeks of people coding with a goal and demonstrate that hard work at the end of the week, and I would like to congratulate everyone that participated.

Below you can find some highlights of the achievements made during past week and the video in the demo session for each part:

Contacts (Telefonica):
  • ALL views are self contained,ready to land through this week, ready to pin ;)
  • Created patches for the navigation using BFCache and the pre-render work. (More about this below).
  • Some nice measures taken with separate views:
    • Activities open between 37%-45% faster with the new approach.
    • Went down 200ms on the startup time, and still have room for improvement.
  • slides: http://borjasalguero.github.io/slides/paris/#1
  • video: https://vimeo.com/135886064 (the app show here is not using the pre-render patches)


Pre-Render / Navigation

This has been one of the pain points moving towards different documents and avoiding flashes. On the video for this talk you will find the following:

  • Gecko and the system app are in charge of performing the navigation.
  • The pre-renders happens behind the scenes, by gecko and the animation to perform the transition between documents has been implemented in the system app.Which means that we want this navigation to be done by the platform.
  • The demos showed here use the work on Contacts and SMS apps splitting views, again the navigation code in both is the same.
  • You can follow the progress here: https://bugzilla.mozilla.org/show_bug.cgi?id=1190805
  • video (highly recommended): https://www.youtube.com/watch?v=VmtCzIO7edc


Memory behavior in NGA apps

We were doing some work related to the memory consumption using the multidocument approach, in the following demo you will see using Firewatch how the use of new mechanisms like BF cache behaves.

Some highlights:

  • We could see during the execution of an app, while this one is in foreground could use more memory, since we are relaying on the use of the BF cache, keeping the state of the page in memory.
  • But since this is automatically controlled by gecko, this memory is also released automatically when the system need it, which means free eviction for views without the developer having to do anything.
  • In the following video you can go through the life of an app, and how the memory is being used during and after usage.
  • video: https://vimeo.com/135888453


Fast List

A lot of work done here around how to improve the performance and responsiveness of the DOM that we created. Focusing the efforts in create a webcomponent that all apps can share and is able to perform extremely well and play nicely with memory, fps and responsiveness.

Some of the demos you could see in the video:

  • Stand alone web component, that can work nicely with DOMScheduler.
  • Edit mode
  • Sticky headers
  • And what is more important, apps using it, like music.
  • video: https://vimeo.com/135900036


FM Radio (phoxygen)

The folks from phoxygen has been focus on trying all the components proposed in NGA, and they demostrated how memory, iframes and workers mix together and how the memory consumption on an app is impacted using the tool that have been developed (threadjs, sw, etc.)

You have the video here: https://vimeo.com/135921334


SMS

The guys were working on landing and stabilizing the navigation patch (still without using the pre-render patch). And splitting more parts of the backend able to run in threads.Also they were doing some insights on testing the performance of different pieces of the architecture.

Did a great job finding some interesting numbers related to different tools like SW, Threads.js, and alwaysLowered window. That you can track here: https://github.com/azasypkin/sw-tests

A great conclusion from their talk was that in some cases, without having a caching mechanism, some of the pieces running in workers are slow to start, but they perform well once everything is in place, which drove to ideas like run non critical parts of the apps in workers or put all the backend code back in the main content if the performance is not improved for the future release.

Check their work here: https://vimeo.com/135908141


Performance

Their main focus was a problem detected with the use of SW and the guys during this week inmediately come with performance measures to check where we were losing time when launching a SW and possible ideas to improve the process.

Follow the process on the bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1191339


Data Sync

The team meet together, with the first week of one of the members, and work around webcrypto and how to interact with kinto.js

The results are pretty cool, and I recommend you to watch the following video to see the synchronization of browser history between firefox desktop and firefox os:

https://www.youtube.com/watch?v=BEYgx5chun0


Music

They have been doing an incredible job in splitting the backend and preparing a new version heavily based on SW, providing a rest api to access the data model by the front-end. In this case the navigation is not used, as the app is composed in different iframes, but all the communication between different parts of it uses all the new concepts proposed.

Also new testing work has been started to learn how to test apps based on SW paradigm.

Hopefully soon we will have in dev_apps the new and shiny version of this great work.


Conclusions

It was an intense week, in the middle of a Parisian summer, pretty hot btw. With a lot of progress, and seeing how the apps that we are working on have separated views and backend.

We have seen the increase of performance and how memory has been improved in some areas and how we need to improve in others.

The navigation, with a in review patch, is looking very smooth and what is better, consistent across apps.

After this week, and once all the patches land, we can start talking about pinning a sms thread, or a contact detail, and why not a music album.

What NGA is going to release for 2.5 has been on the minds of everyone. As promised the splitting of backend and frontend in different views is on track, to support the pinning of the content of our apps, but also has been raised that we could not introduce SW usage as it has uncertain dependencies for 2.5.

Also some teams have put over the table the fact of move some services to main content if the performance of workers is not yet what we want. In flame we could put the services back in the main content together and in z3 we could leave them in separate threads. Again we are learning and  deciding.

So we will continue working and improving the technology that we want to use in the future of the web, but being sure 2.5 looks good ;)

Thanks a lot!

(PD: full length video with the complete demo session will be available soon)

Dietrich Ayala

unread,
Aug 11, 2015, 12:49:55 PM8/11/15
to Francisco Jordano, dev-gaia
Thanks for the wrap-up!

Sounds like the whole NGA effort is culminating in an understanding of how to build performant web apps on mobile devices with a contemporary Web stack. I'd love to see a document of moden mobile web dev best-practices come out of this.

_______________________________________________
dev-gaia mailing list
dev-...@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-gaia

Salvador de la Puente González

unread,
Aug 13, 2015, 4:03:14 AM8/13/15
to Dietrich Ayala, Francisco Jordano, dev-gaia
Congratulations to everyone! There are awesome results there.


Este mensaje y sus adjuntos se dirigen exclusivamente a su destinatario, puede contener información privilegiada o confidencial y es para uso exclusivo de la persona o entidad de destino. Si no es usted. el destinatario indicado, queda notificado de que la lectura, utilización, divulgación y/o copia sin autorización puede estar prohibida en virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma vía y proceda a su destrucción.

The information contained in this transmission is privileged and confidential information intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this transmission in error, do not read it. Please immediately reply to the sender that you have received this communication in error and then delete it.

Esta mensagem e seus anexos se dirigem exclusivamente ao seu destinatário, pode conter informação privilegiada ou confidencial e é para uso exclusivo da pessoa ou entidade de destino. Se não é vossa senhoria o destinatário indicado, fica notificado de que a leitura, utilização, divulgação e/ou cópia sem autorização pode estar proibida em virtude da legislação vigente. Se recebeu esta mensagem por erro, rogamos-lhe que nos o comunique imediatamente por esta mesma via e proceda a sua destruição

Chris Mills

unread,
Aug 18, 2015, 7:29:10 AM8/18/15
to Dietrich Ayala, Francisco Jordano, dev-gaia

> On 11 Aug 2015, at 17:48, Dietrich Ayala <auto...@gmail.com> wrote:
>
> Thanks for the wrap-up!
>
> Sounds like the whole NGA effort is culminating in an understanding of how to build performant web apps on mobile devices with a contemporary Web stack. I'd love to see a document of moden mobile web dev best-practices come out of this.

And I’d help write those up ;-)
0 new messages