You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Joe Bowser <bo...@gmail.com> on 2013/05/24 00:22:13 UTC

Why does deviceready take a second to load on Android?

Hey

I just tested Cordova with the latest JS on Android and I'm noticing a
pretty solid lag in how long it takes for things like the platform
name, version and UUID appear.  Was there a recent change to
deviceReady that causes it to be noticeably slower than it used to be?
 I'd figure that asking is faster than reading through the commit logs
and debugging this.

Anyone know?

Joe

Re: Why does deviceready take a second to load on Android?

Posted by Max Woghiren <ma...@chromium.org>.
It looks like Bryan was correct; the reversion of the change he linked,
which was done to fix mobile-spec on ICS, fixes this problem as well.


On Tue, May 28, 2013 at 1:45 PM, Brian LeRoux <b...@brian.io> wrote:

> createElement would fix that
>
> On Fri, May 24, 2013 at 1:23 PM, Bryan Higgins <br...@bryanhiggins.net>
> wrote:
> > I bet it has to do with this change to mobile-spec.
> >
> > By injecting the script tag, cordova.js does not load until after the DOM
> > has rendered.
> >
> >
> https://git-wip-us.apache.org/repos/asf?p=cordova-mobile-spec.git;a=commit;h=8b1fd7d49c278d43b34b4c041f1575a1a39a664d
> >
> >
> >
> > On Fri, May 24, 2013 at 9:54 AM, Braden Shepherdson <braden@chromium.org
> >wrote:
> >
> >> It might be the time spent doing the plugin loading, but I'm not sure.
> We
> >> should instrument some of these launch steps to see how long they each
> take
> >> and keep an eye on them over time. Eventually and in an ideal world, the
> >> timings could be collected by the CI server so we can spot any
> substantial
> >> increases and figure out their cause.
> >>
> >> Braden
> >>
> >>
> >> On Thu, May 23, 2013 at 6:22 PM, Joe Bowser <bo...@gmail.com> wrote:
> >>
> >> > Hey
> >> >
> >> > I just tested Cordova with the latest JS on Android and I'm noticing a
> >> > pretty solid lag in how long it takes for things like the platform
> >> > name, version and UUID appear.  Was there a recent change to
> >> > deviceReady that causes it to be noticeably slower than it used to be?
> >> >  I'd figure that asking is faster than reading through the commit logs
> >> > and debugging this.
> >> >
> >> > Anyone know?
> >> >
> >> > Joe
> >> >
> >>
>

Re: Why does deviceready take a second to load on Android?

Posted by Brian LeRoux <b...@brian.io>.
createElement would fix that

On Fri, May 24, 2013 at 1:23 PM, Bryan Higgins <br...@bryanhiggins.net> wrote:
> I bet it has to do with this change to mobile-spec.
>
> By injecting the script tag, cordova.js does not load until after the DOM
> has rendered.
>
> https://git-wip-us.apache.org/repos/asf?p=cordova-mobile-spec.git;a=commit;h=8b1fd7d49c278d43b34b4c041f1575a1a39a664d
>
>
>
> On Fri, May 24, 2013 at 9:54 AM, Braden Shepherdson <br...@chromium.org>wrote:
>
>> It might be the time spent doing the plugin loading, but I'm not sure. We
>> should instrument some of these launch steps to see how long they each take
>> and keep an eye on them over time. Eventually and in an ideal world, the
>> timings could be collected by the CI server so we can spot any substantial
>> increases and figure out their cause.
>>
>> Braden
>>
>>
>> On Thu, May 23, 2013 at 6:22 PM, Joe Bowser <bo...@gmail.com> wrote:
>>
>> > Hey
>> >
>> > I just tested Cordova with the latest JS on Android and I'm noticing a
>> > pretty solid lag in how long it takes for things like the platform
>> > name, version and UUID appear.  Was there a recent change to
>> > deviceReady that causes it to be noticeably slower than it used to be?
>> >  I'd figure that asking is faster than reading through the commit logs
>> > and debugging this.
>> >
>> > Anyone know?
>> >
>> > Joe
>> >
>>

Re: Why does deviceready take a second to load on Android?

Posted by Bryan Higgins <br...@bryanhiggins.net>.
I bet it has to do with this change to mobile-spec.

By injecting the script tag, cordova.js does not load until after the DOM
has rendered.

https://git-wip-us.apache.org/repos/asf?p=cordova-mobile-spec.git;a=commit;h=8b1fd7d49c278d43b34b4c041f1575a1a39a664d



On Fri, May 24, 2013 at 9:54 AM, Braden Shepherdson <br...@chromium.org>wrote:

> It might be the time spent doing the plugin loading, but I'm not sure. We
> should instrument some of these launch steps to see how long they each take
> and keep an eye on them over time. Eventually and in an ideal world, the
> timings could be collected by the CI server so we can spot any substantial
> increases and figure out their cause.
>
> Braden
>
>
> On Thu, May 23, 2013 at 6:22 PM, Joe Bowser <bo...@gmail.com> wrote:
>
> > Hey
> >
> > I just tested Cordova with the latest JS on Android and I'm noticing a
> > pretty solid lag in how long it takes for things like the platform
> > name, version and UUID appear.  Was there a recent change to
> > deviceReady that causes it to be noticeably slower than it used to be?
> >  I'd figure that asking is faster than reading through the commit logs
> > and debugging this.
> >
> > Anyone know?
> >
> > Joe
> >
>

Re: Why does deviceready take a second to load on Android?

Posted by Braden Shepherdson <br...@chromium.org>.
It might be the time spent doing the plugin loading, but I'm not sure. We
should instrument some of these launch steps to see how long they each take
and keep an eye on them over time. Eventually and in an ideal world, the
timings could be collected by the CI server so we can spot any substantial
increases and figure out their cause.

Braden


On Thu, May 23, 2013 at 6:22 PM, Joe Bowser <bo...@gmail.com> wrote:

> Hey
>
> I just tested Cordova with the latest JS on Android and I'm noticing a
> pretty solid lag in how long it takes for things like the platform
> name, version and UUID appear.  Was there a recent change to
> deviceReady that causes it to be noticeably slower than it used to be?
>  I'd figure that asking is faster than reading through the commit logs
> and debugging this.
>
> Anyone know?
>
> Joe
>