[b2g] Best way to profile web app startup performance

2015-08-11 Thread James Burke
I want to profile the startup of an app. The goal is to see where
things like layout and paint might block startup to see if we need
some new APIs to turn off these things while the app JS is generating
the starting view, related to this dev-platform thread[1].

How do people do that sort of profiling today?

It is my understanding raptor is not the tool for that, and the
profile.sh script should be used.

I did a build and can run profile.sh via the instructions on MDN[2]. I
can get captures from running processes, but since I want to profile
the startup of a webapp[3], using `start -p [name]` is not the way to
go, since the pid cannot be not known when the app is closed.

Using `./profile.sh start` with no other arguments restarts the
device, but goes to a black screen and is not operable. The MDN page
also indicates this mode of profile.sh is deprecated. The last lines
in the logcat when this happens:

I/ServiceManager(  190): service 'android.security.keystore' died
I/ServiceManager(  190): service 'SurfaceFlinger' died
I/ServiceManager(  190): service 'permission' died
I/ServiceManager(  190): service 'display.qservice' died
I/Gecko   ( 2712): [Child 2712] WARNING: pipe error (3): Connection
reset by peer: file
/home/jr/git/B2G/gecko/ipc/chromium/src/chrome/common/ipc_channel_posix.cc,
line 459
I/Gecko   ( 2712):
I/Gecko   ( 2712): ###!!! [Child][MessageChannel::SendAndWait] Error:
Channel error: cannot send/recv

I tried the WebIDE's profiling tool and clicking the reload button in
there, and I can gather some information that way, but I feel it is
not completely accurate for startup since the reload button also seems
to trigger the install app flow and the app installed popup. It
also appears like the app window is not completely destroyed and
started fresh each time.

James

[1] https://groups.google.com/forum/#!topic/mozilla.dev.platform/F3Mp6dZonMA
[2] 
https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Profiling_with_the_Built-in_Profiler#Other_Ways_to_Profile_B2G
[3] https://github.com/jrburke/fxos-startup-test
___
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g


Re: [b2g] Best way to profile web app startup performance

2015-08-11 Thread James Burke
On Tue, Aug 11, 2015 at 9:34 AM, Fabrice Desré fabr...@mozilla.com wrote:
 You can profile by using the pid of the preallocated app, since this is
 the one that will be used once you actually launch your app.
 You can get it by running |adb shell b2g-info|.

Thanks for the guidance! To be extra literal since it took me an extra
step to process: Look for the process called (Preallocated a, and
use the PID of it in the `./profile.sh start -p [number]` command. It
also shows up for me in `./profile.sh ps` command. I updated the MDN
page[1] with this info.

James

[1] 
https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Profiling_with_the_Built-in_Profiler#Start_the_Profiler
___
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g


Re: [b2g] Is navigator.syncManager used at all?

2015-06-12 Thread James Burke
On Wed, Jun 10, 2015 at 6:53 PM, Yoshi Huang allstars@mozilla.com wrote:
 I also found a test app written by James Burke in
 https://github.com/jrburke/requestsyncmanager
 but it looks to me it's more like a test app.

Just confirming that is a test app, not shipped with gaia. However, I
would like it to still work in the future, so if there are API changes
that I would need to do, please let me know. If it is just a matter of
deleting the app and reinstalling that works for me.

James
___
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g


Re: [b2g] Granting Permissions to the Web

2015-02-18 Thread James Burke
On Wed, Feb 18, 2015 at 3:51 AM, Anne van Kesteren ann...@annevk.nl wrote:
 Trying to figure out how to get sockets and systemXHR into the
 browser has been going on for a very long time now, I think we should
 start embracing that it's unlikely to happen and look elsewhere.

The look elsewhere will be native platforms. While these discussions
may have been going on for a while, hopefully the new bit of
information is that these sorts of capabilities really are useful to
have as shown in FirefoxOS and native platform offerings. Plus, I
really do not think we should be encouraging people to run proxy
servers to open them up to government and hacking hazards.

Hopefully what can be revisited is the frame of mind around these APIs
from a web perspective.

Mobile use is really large. Native mobile apps do not have
restrictions from these APIs. If web sites are concerned about getting
cross domain hits, they can get them now from native apps.

We definitely need to be careful, making sure we do not pass things
like cookies for these types of requests, and to also allow for
services to explicitly indicate they do not want to allow these types
of connections, but what has been suggested instead of using these
types of APIs does not seem better.

James
___
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g


Re: [b2g] Granting Permissions to the Web

2015-02-17 Thread James Burke
On Tue, Feb 17, 2015 at 11:12 AM, David Ascher david.asc...@gmail.com wrote:
 I don't see any data saying that devs aren't making webapps because hosting
 is prohibitive. Is anyone?  (I think it's too _hard_ for people who don't
 have the skills, but that's a whole different ball of wax).

Echoing the sentiment about hard:  it adds a lot more complication.
A service I now need to monitor as a developer to keep running, when
it is not needed if I do a native app. It can also require a different
set of developer skills.

There are security and privacy concerns too, another link in the chain
of connections that can be compromised.

I work on the email app for Gaia. It would give me nightmares to try
to secure a general email server proxy. I would not want to make
guarantees to people on its reliability or trustworthiness, and having
to be on the hook to possibly accommodate government snooping
requests.

I greatly prefer a model where the browser asks the user OK to
connect to this server for cases where this cross domain access is
needed, so that the user knows what is happening, it is a special
privilege, and the user should have control over it.

Maybe there is a different way to go about this, but CORS or running a
proxy is not a sufficient story.

Without this sort of capability, any email web app is at a distinct
disadvantage to a native app environment (also see the need for TCP
sockets in the email case).

James
___
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g


Re: [b2g] Can we deprecate packaged apps?

2015-01-30 Thread James Burke
On Fri, Jan 30, 2015 at 6:48 AM, Benjamin Francis bfran...@mozilla.com wrote:
 There have been several proposals of how to provide privileged hosted apps,
 including work around hosted packages [3] and discussions around a security
 model.

Link [3] (bug 1036275) seems mostly about how to reference resources
inside a zip file. It also seems to imply that the packaged app could
be hosted anywhere, not via a marketplace?

I would be interested to know how validation of the privileged app is
done (this thing I agreed to access these APIs is still the same
vetted thing). If there is some sort of signature checking going on,
it would be great to see that extended to certified apps, where we
allow certain signed apps access to the certified APIs.

This sort of model would allow gaia apps to go hosted. They also
likely need a way to make sure they can provide certain app bundles
for certain gecko versions.

Without those things, it is hard to see the gaia apps going to this
model. We will continue to get new APIs that we will be expected to
use behind a certified flag. The latest is the navigator.sync API.
That API is a great one to have for battery concerns, but needs
service workers to be fully realized, is still new, so it is a
certified API. For users getting 2.2 though, ideally our apps would
use the API in the effort to extend battery life.

I would like to see gaia apps go to a hosted model (even just
marketplace hosting), since it gives us a dogfood way to test how we
expect other apps to be made.
___
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g


Re: [b2g] Visibility plan for document.registerElement (custom elements)

2015-01-28 Thread James Burke
On Wed, Jan 28, 2015 at 11:24 AM, Soledad Penadés spena...@mozilla.com wrote:
 Can you use a polyfill in the meantime? There is a polyfill for enabling
 only the custom element registration part
 http://webcomponents.org/polyfills/custom-elements/

I would prefer to not add that layer if possible. Our custom element
use so far is light (just custom-named divs with extra properties
attached) and we have had a way to modularize our UI, so not a
deal-breaker if we cannot use custom elements.

I also want to target serializing the HTML for some cards used as in
entry points served by service workers, for fast startup. This will
mean if using custom elements, constructing them in very idiomatic
ways, so being able to reuse today's off the shelf components would
not be one of the main drivers for the custom elements.

---

Separately, I was informed off-list that perhaps dev-platform is a
better place to post this question, so I did so there:

https://groups.google.com/forum/#!topic/mozilla.dev.platform/zdYYVi-ayIU

It might be best to continue further discussion on that list.
Apologies for the initial fuzzy list targeting.

Off-list I was also pointed to
https://wiki.whatwg.org/wiki/CustomElements that might have some
useful background information.

James
___
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g


[b2g] For v2.2: distributable certified apps

2014-10-22 Thread James Burke
For 2.2, I would like to see an exploration into allowing Gaia apps, and
apps that can use certified APIs, to be distributed via marketplace
channels, and updated outside full OS updates.

That could take a few forms, including just pushing more/all certified APIs
to privileged status. However, I expect that may not be feasible, so
right now I am assuming there will be a continued need for certified apps.

I wrote up something about this capability here:

https://github.com/jrburke/certified-marketplace

Feel free to file issues in that repo if you have questions about it. Happy
to move the info elsewhere, just wanted to get something up.

More importantly, it would be good to figure out the relative priority of
this sort of feature for 2.2, which is the primary point of this thread.

This sort of capability could be in opposition to some of the UX or product
features.

For example, I am thinking of the themeable feature, to allow apps to be
themed, and to have that theming coordinated across apps, and for apps to
have a specific dependency on a theme.gaiamobile.org app.

However, this type of app distribution capability is very fitting for our
mission, as it allows more people to make certified apps (after being
vetted in some way) and to allow those apps to get updates outside of full
OS updates.

---

If this is just too big of a project for 2.2, then I would like to get an
awareness or some sort of agreement for allowing individual apps to follow
this path, and to realize it may mean those apps are not able to meet some
other goals if they pursue this route.

Specifically, I work on the email app, and I believe we could still get to
a updatable via marketplace, and I would like to try for that for 2.2:

Email app goes privileged, and the app just lives with what is available to
privileged apps. I think this is possible and still have a great, usuable
email app.

However, it means email not picking up any gaia-wide efforts that my
require certified stuff. For 2.2, that could mean things like theming and
if custom elements are not fully enabled for non-certified use, any common
building blocks.

Even if custom elements are available for 2.2, I am sure there will be
other things in other releases, just pointing out the need to get wider
agreement this pathway is OK for some apps that may be seen as part of
gaia.

It also means possible modifications to the l10n.js capability to load
localizations from app storage, and to do downloads of localization bundles
from somewhere. While I am willing to do the modifications, it would still
require some impact on reviewers' time, and likely some server work.

To clarify: I want to preserve the existing localizer workflow, just want
to modify how an app pulls in the final localizations, see above link for
some more background.

---

In summary: I would like this “certified” capability considered for 2.2. I
am not expecting an immediate resolution, as all the 2.2 work needs to be
balanced in total, and is still in planning.

This is just to get it on the radar and to call out some of the tensions.
Also, dev could start some plumbing now while planning is still in
progress, and where it makes sense for the email app, I will start
exploring in these areas.

James

(sending to dev-b2g, as it seems the most appropriate for what this
capability spans, and want to avoid cross posting to multiple lists)
___
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g


Re: [b2g] Settings API queries fail after inner-window-destroyed

2014-09-25 Thread James Burke
On Thu, Sep 25, 2014 at 6:08 PM, Kyle Machulis kmachu...@mozilla.com wrote:

 Return fake DOMRequest-like objects that instantly fail?

I favor this, although not sure what is meant by fake vs. just a real
DOMRequest that doesn’t do anything special/will not call onsuccess,
just onerror.

Expressing the failure via an onerror call would match what I would
expect from promise-like code: any operation that is async should get
an object that captures the result of the operation, and handle the
success or errors as functions. For DOMRequest, it is attaching .on*
properties, for promises it is passing functions to .then().

This also means the error handling is just in one place, the .onerror.
Instead of needing to manage a try{} around the acquisition of the
DOMRequest and then in the .onerror.

James
___
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g


Re: [b2g] Application scopes

2014-08-06 Thread James Burke
On Tue, Aug 5, 2014 at 11:27 PM, Jonas Sicking jo...@sicking.cc wrote:

 On Tue, Aug 5, 2014 at 7:51 PM, James Burke jrbu...@gmail.com wrote:
  The use case is a site that has app-like functionality for offline, but
 has
  product pages that are not tied to that app, and the app does not know
 how
  to navigate to them on its own. And both the app and the site are from
 the
  same domain, because that is the well known identifier for users.

 Sorry, I don't understand this.


This was the example I was thinking of, perhaps I have a misunderstanding
somewhere:

My users knows about my password manager, at pwm.com. I have the following
structure:

* pwm.com/ - index page that gives summary, and an install button.

* pwm.com/app.html the main app page mentioned in the manifest, the
launch_path. It uses appcache or a way to get local assets under /app as
the installed app.

Then a bunch of product pages that are not really needed for use of the app
once it is installed:

* pwm.com/features.html - in depth feature survey.
* pwm.com/help.html - could be a help forum/support that changes often.
* pwm.com/comparison.html - compares against similar password managers.

I would prefer to not have those last three open inside my app, as the app
was configured around local data storage and may have routes/pages that do
not correspond with the public site URLs.

So a way to tell the system “do not open up my app for those URLs, just
what is installed locally”.

Perhaps similar to when I have a tab opened for pwm.com/app.html in a
desktop browser, then in another tab I am on a different web site and I
click on a link on that site that goes to pwm.com/help.html.

James
___
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g


Re: [b2g] Sensor events when the screen is off via wakelock. Good idea or?

2014-08-05 Thread James Burke
On Tue, Aug 5, 2014 at 12:59 AM, Jan Jongboom janjongb...@gmail.com wrote:

 On Sunday, August 3, 2014 3:48:52 AM UTC+2, Jonas Sicking wrote:
  * Add the ability to specify a vibration pattern to the Notification
 
  API. I.e. when creating a notification, enable passing not just the
 
  text content of the notification, but also the vibration pattern that
 
  is played with the notification.

 I think this should be part of an overhaul of notifications API, with more
 finer control over how notifications are shown (e.g. grouping when multiple
 notifications come in like in Android, or widgets inline, etc.). Don't know
 if this would be the place for it.


Possibly related: for email, we wanted finer control over notification
behaviors/modes, filed this previously:

https://bugzilla.mozilla.org/show_bug.cgi?id=912645

James
___
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g


Re: [b2g] Application scopes

2014-08-05 Thread James Burke
On Mon, Aug 4, 2014 at 7:20 PM, Jonas Sicking jo...@sicking.cc wrote:


 High-level overview of proposed solution:

 Add two fields to the application manifest:
 {
   name: AwesomeGame,
   ...
   scope: [http://awesomegame.com/*;],
   open-in-app: [http://awesomegamehelper.com/*;]
 }



1) What is the scope setting if I do not want outside apps to deep link,
because I want a separate cookie jar/db space as an app vs plain browser
web navigation, `scope: []`?

The use case is a site that has app-like functionality for offline, but has
product pages that are not tied to that app, and the app does not know how
to navigate to them on its own. And both the app and the site are from the
same domain, because that is the well known identifier for users.

2) What is the open-in-app setting if I want to open all links triggered
from my app to open inside my app, `open-in-app: [“*”]`?

The use case is something like Yelp, that wants to perhaps track which
restaurant pages are visited, and keep quick links back to the restaurant
review page visible while that navigation occurs.
___
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g


Re: [b2g] Gaia is currently closed

2014-06-25 Thread James Burke
Judging from the commit log in Gaia, Gaia appears to be open now. Someone
who has topic mod abilities for #gaia may want to change the IRC room topic.



On Tue, Jun 24, 2014 at 1:49 PM, Ryan VanderMeulen 
rvandermeu...@mozilla.com wrote:

 Due to high test job backlog caused by problems with today's reconfig, all
 trunk trees on TBPL are currently closed. Gaia has been pre-emptively
 closed to avoid any bustage pileups for when b2g-inbound reopens.

 Apologies for any inconvenience this causes, we will reopen as soon as we
 are able.

 -Ryan
 ___
 dev-b2g mailing list
 dev-b2g@lists.mozilla.org
 https://lists.mozilla.org/listinfo/dev-b2g

___
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g


Re: [b2g] Session Restoring of WebApps

2014-05-01 Thread James Burke
On Tue, Apr 8, 2014 at 9:24 AM, Alive al...@mozilla.com wrote:
 In case not every one knows, we are trying to keep a crashed app in task
 manager and restore it with the latest url. It’s implemented already,
 see https://bugzilla.mozilla.org/show_bug.cgi?id=935750

 Someone call it ‘zombie app’, but I call this ‘suspending app’ to reflect
 it’s suspending.

 I am not familiar with how gecko implements session restore,
 but as James Burke said, it’d be easy to keep the state with url in system
 app and restore the url in the app resuming process.

I was curious to see how the URL restoration worked, what its limits
were, so I created a test app that uses pushState with URL fragment ID
changes. It seems like perhaps that bug is just for a crash scenario
and not an OOM? I could not trigger a case where it would resume from
last URL with the fragment ID, but I was mostly testing an OOM case.

But bigger picture for me, along the thoughts in this thread, is to
have a way for the history state to be maintained, such that this
sample app could relaunch at its last state/URL and clicking the 
back button inside the app would continue to work for the history
state it had previously.

I can see where there are complications for the system to know when to
restore this and when to start fresh based on user action. Hopefully
the test app could help if someone wanted to play with changes to get
it to work. If there are bugs already filed for this, or other
discussions related to it, feel free to point me in the right
direction.

App zip:
http://jrburke.com/work/gaia/fxos-url-state.zip

Can be installed using about:app-manager:
https://github.com/jrburke/gaia-dev-zip#for-the-ux-person

Source code:
https://github.com/jrburke/fxos-url-state

James
___
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g


Re: [b2g] a proposal on one tool to rule them all

2014-04-21 Thread James Burke
On Mon, Apr 21, 2014 at 10:20 AM, Benoit Girard bgir...@mozilla.com wrote:

 Otherwise we just have to upload the symbols to the symbol server and add
 code to query the symbols when profiling. We also need to implement an
 versioning system for XUL. That would have no impact to what we ship but
 we'd need to modify the build script and have the symbol servers ready to
 handle this data.


Perhaps an intermediate step to that full goal:

I would be happy with some pvt nightly build that just delivered whatever
was needed by profile.sh in the build zip, like what would be generated via
a local build. So not necessarily part of the files pushed to the phone,
just in the build zip.

Presumably, however that works now will work at least on the hamachi device
I use today, no memory/size issues, just as if I did the build locally. I
am perfectly happy to follow manual instructions to copy the files from
that zip to a particular location relative to profile.sh so that it is
happy and can run, without me doing the full build locally.

Making profile.sh smart and be able to pull from a server is great, just
looking for a way to get to a profile endpoint if it looks like the full
goal would take more time to accomplish.

James
___
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g


Re: [b2g] a proposal on one tool to rule them all

2014-04-08 Thread James Burke
On Mon, Apr 7, 2014 at 10:34 AM, Dave Huseby dhus...@mozilla.com wrote:
 Thoughts?  I would really like to get some feedback on this.  If we
 think this is a good idea, it will dominate the perf dev-tools effort
 for the foreseeable future as it would be a tool useful for both Mozilla
 engineers (e.g. fxos-perf team, gaia team, etc) and 3rd party app
 developers.

One thing that also might help make the whole perf capture easier to
do today, without needing to expand the tooling:

It would be nice to have a way to get symbols for use in the
profile.sh workflow without needing to do a local build myself.
Perhaps provide them as an option for engineering pvt builds.

For some of us gaia developers, needing to maintain a local build of
b2g on a laptop (plus the extra hitches if using latest OS X) means it
is enough of a barrier that I have not done it recently, but at the
same time have wanted to do some perf captures.

James
___
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g


Re: [b2g] If you use setTimeout in tests, you are gonna have a bad time

2013-12-18 Thread James Burke
On Wed, Dec 18, 2013 at 8:10 AM, Julien Wajsberg jwajsb...@mozilla.com wrote:
 The main issue is that using setTimeout or other async tests on Travis
 and TBPL will always trigger intermittent from time to time because it
 will hit the max timeout for a test.

 So sometimes we can't avoid it, and in that case we should augment the
 expected timeout, but we should try hard to not use async tests if it's
 possible.

Switching code that usually expects async operation to go sync can
open up bugs of its own, and they are very subtle, hard to catch and
debug[1]. Unfortunately I know that from previous experience.

For me, it also seems like it is trying to work around a problem in
the test infrastructure that ultimately defeats the purpose of the
tests: to verify that the code written will perform as expected. If
the code written expects async operation, the tests should be async.
Although I also appreciate that having a robust test infrastructure is
hard, requires dedicated, ongoing resources.

For speed concerns, perhaps the microtasks idea may help with that. I
am still hazy on them, but it seems like an async callback is called
after the current execution via a local queue, not placed at the end
of the main event loop. They seem like they will be used behind the
scenes, but I have been thinking of using an immediately resolved
promise to take advantage of them if/when microtasks and promises are
in the platform (and assuming the promise implementation uses them).

In any case, I do not want to derail the main message of this thread:
do not use setTimeout to guess when an async action is done, listen
for an event or publicly observable state to confirm the completion of
the async operation instead.

[1] http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony
___
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g


Re: [b2g] starttls email

2013-09-03 Thread James Burke
On Tue, Sep 3, 2013 at 9:48 PM, an novac.a...@gmail.com wrote:
 Anyone knows if the email app supports starttls? I use a mail server which 
 uses starttls for all of its services and I get an error when the app tries 
 to connect to it.

Not in a release yet, but the work is in progress. You can follow this
bug to know when it finishes landing:

https://bugzilla.mozilla.org/show_bug.cgi?id=847032

James
___
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g


[b2g] unagi transition plan

2013-08-27 Thread James Burke
There have been rumblings of the unagi devices no longer being
supported in the near future for 1.2 work.

There are a few people within and without Mozilla that only have an
unagi devices. What devices are suggested for people that currently
have unagi devices?

This is my current understanding, but it has been pieced together,
hoping to get confirmation of this guidance:

1) A developer doing daily gaia development: try to get a hamachi. You
need a phone that is close to what is shipping for making sure changes
do not affect performance. Caveat seems to be that they may be hard to
get.

2) A developer that wants to start making apps for firefoxos: the
nexus 4 may be an option. It could also be used for main gaia work,
but note: while the build settings for nexus 4 try to throttle it to
look more like the kinds of devices that may ship in the near term, it
is not an exact match, so use with caution.

I have ordered a Nexus 4 as backstop to make sure I can keep working
in case my unagi stops working, but I believe I should also acquire a
more realistic shipping device for any performance work. To me that
implies hamachi, but it will be good to know if there are other
options.

James
___
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g


Re: [b2g] Save/restore feature

2013-07-06 Thread James Burke
On Sat, Jul 6, 2013 at 3:58 PM, Fabrice Desre fabr...@mozilla.com wrote:
 On the technical side:

This may be going too far, but what about the possibility of
implementing WebUSB[1], and using that in some fashion to allow a
different firefox phone to back up another phone with a direct USB
connection? I could see that as being useful for people that do not
have a dedicated PC.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=674718

James
___
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g


Re: [b2g] mozilla-b2g github avatar

2013-07-02 Thread James Burke
You may want to get a pencil version of the image:

http://www.mozilla.org/en-US/styleguide/identity/firefoxos/community/

I believe they wanted to reserve the the one with the colors for
partner/release branding.

James


On Tue, Jul 2, 2013 at 2:52 PM, Ben Kelly bke...@mozilla.com wrote:
 Hi all,

 Now that we have this cool profile pic:

   
 https://assets.mozillalabs.com/Graphics/Facebook/FirefoxOS/fb_social_avatar_403x403.png

 I was wondering if we could use it for the mozilla-b2g organization on Github.

 Thoughts?  Any admins out there willing to update the group's gravatar 
 setting?

 Anyway, this is obviously not a priority.  Just thought I would ask.  :-)

 Thanks.

 Ben
 ___
 dev-b2g mailing list
 dev-b2g@lists.mozilla.org
 https://lists.mozilla.org/listinfo/dev-b2g
___
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g


Re: [b2g] Startup work delaying event loop?

2013-04-19 Thread James Burke
On Thu, Apr 18, 2013 at 2:48 AM, Justin Lebar justin.le...@gmail.com wrote:
 It's possible that the main process is taking CPU time from the child
 process, and that's why it appears that the child process's event loop
 is busy at that point in time.  But if you want to know the answer for
 sure, you'd have to profile.  We have tools that will let you get a
 fairly complete picture of what's going on.

I tried a b2g build with the 1ms profile patch applied and did a
profile.sh capture. It did not seem to account for all the time, but I
am very new to deciphering the output.

I wrote up what I could make out of it and opened a ticket that points
to the perf capture, as it seems like that may be a more appropriate
channel for this kind of thing:
https://bugzilla.mozilla.org/show_bug.cgi?id=863870

James
___
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g


Re: [b2g] App load signal

2013-04-18 Thread James Burke
On Thu, Apr 18, 2013 at 2:51 AM, Justin Lebar justin.le...@gmail.com wrote:
 File a bug and we can see if this is reasonable!

Thanks for suggestion. For future reference, filed here:

https://bugzilla.mozilla.org/show_bug.cgi?id=863499

James
___
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g


[b2g] Startup work delaying event loop?

2013-04-17 Thread James Burke
I am investigating email app cold startup time. If the code puts
something in the event loop via a postMessage or a very short
setTimeout during the startup of the app, it could be delayed as much
as ~130-150ms for the first item, and often a follow-on item after
that one can take ~20-50ms. This can add up to around ~200ms delay for
app logic to complete.

This is using BRANCH=v1-train VARIANT=eng b2g builds for the unagi
device. I am using a build from code pulled around 4pm April 16
Pacific time.

I did a test using this app:
https://github.com/jrburke/gaia/tree/eventloop/apps/eventloop

Specifically, this test.js:
https://github.com/jrburke/gaia/blob/eventloop/apps/eventloop/test.js

Some sample output:
FAST TICK DONE IN: 134.704587996
DEFAULT SET TIMEOUT DONE IN: 52.97851700465
0 SET TIMEOUT DONE IN: 18.4631329929
4ms SET TIMEOUT DONE IN: 6.0424869

After the page has loaded, the times to complete the callbacks are in
line with expectations, it is just during the startup phase where the
time delay is really large.

I did a run by disabling the screenshotting in gaia, and that seems to
help the second, ~50ms case, removing that delay, but the first one
still remains:

FAST TICK DONE IN: 144.409178993
DEFAULT SET TIMEOUT DONE IN: 1.342774006452
0 SET TIMEOUT DONE IN: 0.640868998387
4ms SET TIMEOUT DONE IN: 4.63867200042

I can appreciate that the answer may be the platform is still
starting up the mozbrowser, this is expected.

However, I was hoping that I would not have to special case a sync
path for some generic code used for dynamic async loading of segments
of the app, just for the first card setup. Even with a special sync
path, it seems like I just shift around the ~150ms wait to another
point in the app, and still seems to get in there before the user can
interact with the first card.

It also seems odd because the page is pretty simple (no CSS, l10n),
and the script is set as defer, so I would have expected that the
script was one of the last things run as part of the app load.

James
___
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g


[b2g] App load signal

2013-04-17 Thread James Burke
This started on dev-gaia:
http://groups.google.com/group/mozilla.dev.gaia/browse_thread/thread/a0faa6512f71bc94

Summary:
As apps use more async/defer-loaded JS and more async APIs for final
construction, the platform cannot accurately detect when the app has
finished loading and is in a usable state.

Ideally the app could signal to the platform when it considers itself
loaded. This would give the following immediate benefits:

* better transitions from app screenshots to running app (avoiding
its a web page white flash during initial load)
* better indication when a screenshot could be taken, without it
happening during the time the app needs to finish the load.
* better tracking of how long apps actually take to load to be usable.

Would it be possible for the platform to support a way for the app to
signal that is has finished loading?

Perhaps a 'mozappload' (or some moz-prefixed) event that can be
created via new CustomEvent by the app JS code and dispatched on
window, and the platform would allow mozbrowser elements to surface
this event, so that the gaia system could listen for it, as it can for
the other mozbrowser events:

https://developer.mozilla.org/en-US/docs/WebAPI/Browser#Events

James
___
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g


Re: [b2g] Scroll bar fade out interfering with CSS animation?

2013-01-24 Thread James Burke
On Fri, Jan 18, 2013 at 1:23 PM, James Burke jrbu...@gmail.com wrote:
 Any hints or guidance on how to get a smooth animation in this case?

I filed the following to track this possible issue, so any feedback
should be placed in that ticket:

https://bugzilla.mozilla.org/show_bug.cgi?id=834353

James
___
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g