Part III: Profiling Firefox OS.. An Entry point

David Clarke

Gathering profiling Data on Firefox OS can be done in several different ways.
#1) Simpler is better, sometimes a stop watch is a great medium with which to gather timing data for an application you don’t understand.

Picture of StopWatch

Stop Watch

2) In Application Profiling

A great way to accomplish this is to use timestamps in javascript to determine when specific things are happening, and if you are having a bottle neck insdie your application.

Ex:

var d = new Date();

console.log(“The time since epoch = ” + d.getTime());

Once you insert a few of these statements in “strategically” placed points.

Just cd gaia; make install-gaia, this will install the new version of gaia to your phone, and you can see what code path gets triggered at which points.

3)Measuring app startup Times

Turn on show app load times  by loading your settings app.

Click Device Information –> More Information –> Developer –> Show Time to Load.

This is one mechanism for measuring app start times, but this only measure time until mozbrowserfirstpaint which measure the time until first pixels are available for an app.

More details can be found in Bug: 787378