Re: [Development] Qt 5.2 Beta - is it really much slower to parse qml/javascript on android?

2014-01-19 Thread Ben Lau
Seem that loading from asset storage is really slow..

I am writing a QML application with around 15 QML files. The loading time
is 20 sec. I have tried to run profiler and take out many component to
speed up.

Finally , I found that just take out the statement "import ./widgets" can
reduce 10sec load time! The statement is used to load QML from other folder
with 3 QML files only.

Ofcoz , I will switch to use Qt resources. But I wonder that is the problem
of asset storage or I did something wrong with my code?



On 30 October 2013 22:06, BogDan  wrote:

> Hi,
>
>   I just checked the Qt5 assets implementation and for some reason that I
> fail to understand the assets cache mechanism from Qt4 is not there ...
> that is the reason why Necessitas is way much faster than Qt5.x :)
> I'll add the cache mechanism ASAP.
>
> Thanks!
>
> Cheers,
> BogDan.
>
>
> >
> >
> >OK. You just nailed it! After moving the files into a resource file the
> "startup" went from a little over 4 seconds to less than half second.  Just
> for context: my application has 18qml files, 2 small javascript files and
> 20 or so images and not all of them are loaded on startup!
> >
> >
> >A little surprising and a lot disappointing is that my main phone
> (android 4.1.2) seems to make the problem even worst. I tried on a Nexus7
> (android 4.3) and a 2+year old HTC inspire (android 4.2.2) and both are
> much quicker when not using the resource file (there is the possibility
> that the actual android has been improved since both of these devices have
> newer versions of it). They are still much slower than using the resource
> file.
> >
> >
> >On hindsight:
> >1. my original qml 1.0 version uses the resource file - didn't occur to
> me that this could make such a difference!
> >
> >2. The Qt 5.1 document on android suggests using the resource (
> http://qt-project.org/doc/qt-5.1/qtdoc/android-support.html) and even
> states "The most convenient option is to bundle the resources into a qrc
> file, which gets built into the application binary. This approach reduces
> the porting effort considerably and provides faster access to the
> resources. It is also a cross-platform approach, which makes porting to
> other platforms easier.". For the 5.2 version I think we should make it
> stand out with some "big bold red blinking letters (TM)" and also change
> the wizard template to use resources by default for android. It can be the
> difference between a "useless" application that takes forever to start and
> "Qt/qml is really great even on  android"!
> >
> >
> >Thanks all!
> >Felipe
> >
> >
> >
> >On Wed, Oct 30, 2013 at 4:09 AM, BogDan  wrote:
> >
> >Hi,
> >>
> >>Android's assets are indeed slower (~2X) than Qt's resource system,
> >>but not that slow ! :)
> >>
> >>If I recall correctly in the beginning of this thread Kai said that using
> >>Necessitas SDK it was ok, and I don't think he is using another technique
> >> to store the qml files than he is using for Necessitas. Also the assets
> >>implementation should be pretty much the same ... unless me (or someone
> else)
> >>screw the implementation in Qt 5.2 :).
> >>
> >>Cheers,
> >>BogDan.
> >>
> >>
> >>
> >>
> >>>
> >>> I think i know whats the issue if its still not fixed.
> >>>
> >>> My guess is that you don't use the resource system of Qt but the
> android
> >>> application assets to store your components, the last time i had issues
> >>> with this all the time was lost in the horrible slow fileengine for
> assets on
> >>> android. It looked to me it was reopening the assets all the time
> which seems
> >>> expensive.
> >>>
> >>> I haven't tried it since 5.1 but if it is not fixed its very likely the
> >>> cause
> >>> of your problem.
> >>>
> >>> Björn
> >>> Am Mittwoch, 30. Oktober 2013, 07:07:41 schrieb Koehne Kai:
> >>>
> >>>>  > -Original Message-
> >>>>  > From: development-bounces+kai.koehne=digia@qt-project.org
> >>>>  > [mailto:development-bounces+kai.koehne=digia@qt-project.org]
> On
> >>>>  > Behalf Of Felipe Crochik
> >>>>  > Sent: Tuesday, October 29, 2013 7:13 PM
> >>>>  > To: Hausmann Simon
> >>>>  > Cc: development@qt-project.org
> >>>>  > Subjec

Re: [Development] Qt 5.2 Beta - is it really much slower to parse qml/javascript on android?

2013-11-01 Thread Cornelius Hald
Thanks for the link BogDan!

Cheers,
Conny

Am Freitag, den 01.11.2013, 14:44 -0700 schrieb BogDan:
> Hi,
> 
> https://bugreports.qt-project.org/browse/QTBUG-34464
> 
> Cheers,
> BogDan.
> 
> Trimis din Yahoo! Mail pe Android
> 
> 
> 
> 
> __
> From: Cornelius Hald ; 
> To: BogDan ; 
> Cc: development@qt-project.org ; 
> Subject: Re: [Development] Qt 5.2 Beta - is it really much slower to
> parse qml/javascript on android? 
> Sent: Fri, Nov 1, 2013 4:48:49 PM 
> 
> 
> Hi,
> 
> is there a ticket to track this issue? I'd like to get an update when
> it's fixed :)
> 
> Thanks!
> Conny
> 
> On Wed, 2013-10-30 at 07:06 -0700, BogDan wrote:
> > Hi,
> > 
> >  I just checked the Qt5 assets implementation and for some reason
> that I fail to understand the assets cache mechanism from Qt4 is not
> there ... that is the reason why Necessitas is way much faster than
> Qt5.x :)
> > I'll add the cache mechanism ASAP. 
> > 
> > Thanks!
> > 
> > Cheers,
> > BogDan.
> > 
> > 
> > >
> > >
> > >OK. You just nailed it! After moving the files into a resource file
> the "startup" went from a little over 4 seconds to less than half
> second.  Just for context: my application has 18qml files, 2 small
> javascript files and 20 or so images and not all of them are loaded on
> startup!
> > >
> > >
> > >A little surprising and a lot disappointing is that my main phone
> (android 4.1.2) seems to make the problem even worst. I tried on a
> Nexus7 (android 4.3) and a 2+year old HTC inspire (android 4.2.2) and
> both are much quicker when not using the resource file (there is the
> possibility that the actual android has been improved since both of
> these devices have newer versions of it). They are still much slower
> than using the resource file.
> > >
> > >
> > >On hindsight: 
> > >1. my original qml 1.0 version uses the resource file - didn't
> occur to me that this could make such a difference!
> > >
> > >2. The Qt 5.1 document on android suggests using the resource
> (http://qt-project.org/doc/qt-5.1/qtdoc/android-support.html) and even
> states "The most convenient option is to bundle the resources into a
> qrc file, which gets built into the application binary. This approach
> reduces the porting effort considerably and provides faster access to
> the resources. It is also a cross-platform approach, which makes
> porting to other platforms easier.". For the 5.2 version I think we
> should make it stand out with some "big bold red blinking letters
> (TM)" and also change the wizard template to use resources by default
> for android. It can be the difference between a "useless" application
> that takes forever to start and "Qt/qml is really great even on
> android"!
> > >
> > >
> > >Thanks all!
> > >Felipe
> > >
> > >
> > >
> > >On Wed, Oct 30, 2013 at 4:09 AM, BogDan 
> wrote:
> > >
> > >Hi,
> > >>
> > >>Android's assets are indeed slower (~2X) than Qt's resource
> system,
> > >>but not that slow ! :)
> > >>
> > >>If I recall correctly in the beginning of this thread Kai said
> that using
> > >>Necessitas SDK it was ok, and I don't think he is using another
> technique
> > >> to store the qml files than he is using for Necessitas. Also the
> assets 
> > >>implementation should be pretty much the same ... unless me (or
> someone else)
> > >>screw the implementation in Qt 5.2 :).
> > >>
> > >>Cheers,
> > >>BogDan.
> > >>
> > >>
> > >>
> > >>
> > >>>
> > >>> I think i know whats the issue if its still not fixed.
> > >>>
> > >>> My guess is that you don't use the resource system of Qt but the
> android
> > >>> application assets to store your components, the last time i had
> issues
> > >>> with this all the time was lost in the horrible slow fileengine
> for assets on
> > >>> android. It looked to me it was reopening the assets all the
> time which seems
> > >>> expensive.
> > >>>
> > >>> I haven't tried it since 5.1 but if it is not fixed its very
> likely the
> > >>> cause
> > >>> of your problem.
> > >>>
> > >>> Bjö

Re: [Development] Qt 5.2 Beta - is it really much slower to parse qml/javascript on android?

2013-11-01 Thread BogDan
Hi,

https://bugreports.qt-project.org/browse/QTBUG-34464

Cheers,
BogDan.

Trimis din Yahoo! Mail pe Android

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Qt 5.2 Beta - is it really much slower to parse qml/javascript on android?

2013-11-01 Thread Cornelius Hald
Hi,

is there a ticket to track this issue? I'd like to get an update when
it's fixed :)

Thanks!
Conny

On Wed, 2013-10-30 at 07:06 -0700, BogDan wrote:
> Hi,
> 
>   I just checked the Qt5 assets implementation and for some reason that I 
> fail to understand the assets cache mechanism from Qt4 is not there ... that 
> is the reason why Necessitas is way much faster than Qt5.x :)
> I'll add the cache mechanism ASAP. 
> 
> Thanks!
> 
> Cheers,
> BogDan.
> 
> 
> >
> >
> >OK. You just nailed it! After moving the files into a resource file the 
> >"startup" went from a little over 4 seconds to less than half second.  Just 
> >for context: my application has 18qml files, 2 small javascript files and 20 
> >or so images and not all of them are loaded on startup!
> >
> >
> >A little surprising and a lot disappointing is that my main phone (android 
> >4.1.2) seems to make the problem even worst. I tried on a Nexus7 (android 
> >4.3) and a 2+year old HTC inspire (android 4.2.2) and both are much quicker 
> >when not using the resource file (there is the possibility that the actual 
> >android has been improved since both of these devices have newer versions of 
> >it). They are still much slower than using the resource file.
> >
> >
> >On hindsight: 
> >1. my original qml 1.0 version uses the resource file - didn't occur to me 
> >that this could make such a difference!
> >
> >2. The Qt 5.1 document on android suggests using the resource 
> >(http://qt-project.org/doc/qt-5.1/qtdoc/android-support.html) and even 
> >states "The most convenient option is to bundle the resources into a qrc 
> >file, which gets built into the application binary. This approach reduces 
> >the porting effort considerably and provides faster access to the resources. 
> >It is also a cross-platform approach, which makes porting to other platforms 
> >easier.". For the 5.2 version I think we should make it stand out with some 
> >"big bold red blinking letters (TM)" and also change the wizard template to 
> >use resources by default for android. It can be the difference between a 
> >"useless" application that takes forever to start and "Qt/qml is really 
> >great even on  android"!
> >
> >
> >Thanks all!
> >Felipe
> >
> >
> >
> >On Wed, Oct 30, 2013 at 4:09 AM, BogDan  wrote:
> >
> >Hi,
> >>
> >>Android's assets are indeed slower (~2X) than Qt's resource system,
> >>but not that slow ! :)
> >>
> >>If I recall correctly in the beginning of this thread Kai said that using
> >>Necessitas SDK it was ok, and I don't think he is using another technique
> >> to store the qml files than he is using for Necessitas. Also the assets 
> >>implementation should be pretty much the same ... unless me (or someone 
> >>else)
> >>screw the implementation in Qt 5.2 :).
> >>
> >>Cheers,
> >>BogDan.
> >>
> >>
> >>
> >>
> >>>
> >>> I think i know whats the issue if its still not fixed.
> >>>
> >>> My guess is that you don't use the resource system of Qt but the android
> >>> application assets to store your components, the last time i had issues
> >>> with this all the time was lost in the horrible slow fileengine for 
> >>> assets on
> >>> android. It looked to me it was reopening the assets all the time which 
> >>> seems
> >>> expensive.
> >>>
> >>> I haven't tried it since 5.1 but if it is not fixed its very likely the
> >>> cause
> >>> of your problem.
> >>>
> >>> Björn
> >>> Am Mittwoch, 30. Oktober 2013, 07:07:41 schrieb Koehne Kai:
> >>>
> >>>>  > -Original Message-
> >>>>  > From: development-bounces+kai.koehne=digia@qt-project.org
> >>>>  > [mailto:development-bounces+kai.koehne=digia@qt-project.org] On
> >>>>  > Behalf Of Felipe Crochik
> >>>>  > Sent: Tuesday, October 29, 2013 7:13 PM
> >>>>  > To: Hausmann Simon
> >>>>  > Cc: development@qt-project.org
> >>>>  > Subject: Re: [Development] Qt 5.2 Beta - is it really much slower to
> >>> parse
> >>>>  > qml/javascript on android?
> >>>>  >
> >>>>  > Simon,
> >>>>  > Quick update:
> >>>>  > I tr

Re: [Development] Qt 5.2 Beta - is it really much slower to parse qml/javascript on android?

2013-10-30 Thread BogDan
Hi,

  I just checked the Qt5 assets implementation and for some reason that I fail 
to understand the assets cache mechanism from Qt4 is not there ... that is the 
reason why Necessitas is way much faster than Qt5.x :)
I'll add the cache mechanism ASAP. 

Thanks!

Cheers,
BogDan.


>
>
>OK. You just nailed it! After moving the files into a resource file the 
>"startup" went from a little over 4 seconds to less than half second.  Just 
>for context: my application has 18qml files, 2 small javascript files and 20 
>or so images and not all of them are loaded on startup!
>
>
>A little surprising and a lot disappointing is that my main phone (android 
>4.1.2) seems to make the problem even worst. I tried on a Nexus7 (android 4.3) 
>and a 2+year old HTC inspire (android 4.2.2) and both are much quicker when 
>not using the resource file (there is the possibility that the actual android 
>has been improved since both of these devices have newer versions of it). They 
>are still much slower than using the resource file.
>
>
>On hindsight: 
>1. my original qml 1.0 version uses the resource file - didn't occur to me 
>that this could make such a difference!
>
>2. The Qt 5.1 document on android suggests using the resource 
>(http://qt-project.org/doc/qt-5.1/qtdoc/android-support.html) and even states 
>"The most convenient option is to bundle the resources into a qrc file, which 
>gets built into the application binary. This approach reduces the porting 
>effort considerably and provides faster access to the resources. It is also a 
>cross-platform approach, which makes porting to other platforms easier.". For 
>the 5.2 version I think we should make it stand out with some "big bold red 
>blinking letters (TM)" and also change the wizard template to use resources by 
>default for android. It can be the difference between a "useless" application 
>that takes forever to start and "Qt/qml is really great even on  android"!
>
>
>Thanks all!
>Felipe
>
>
>
>On Wed, Oct 30, 2013 at 4:09 AM, BogDan  wrote:
>
>Hi,
>>
>>Android's assets are indeed slower (~2X) than Qt's resource system,
>>but not that slow ! :)
>>
>>If I recall correctly in the beginning of this thread Kai said that using
>>Necessitas SDK it was ok, and I don't think he is using another technique
>> to store the qml files than he is using for Necessitas. Also the assets 
>>implementation should be pretty much the same ... unless me (or someone else)
>>screw the implementation in Qt 5.2 :).
>>
>>Cheers,
>>BogDan.
>>
>>
>>
>>
>>>
>>> I think i know whats the issue if its still not fixed.
>>>
>>> My guess is that you don't use the resource system of Qt but the android
>>> application assets to store your components, the last time i had issues
>>> with this all the time was lost in the horrible slow fileengine for assets 
>>> on
>>> android. It looked to me it was reopening the assets all the time which 
>>> seems
>>> expensive.
>>>
>>> I haven't tried it since 5.1 but if it is not fixed its very likely the
>>> cause
>>> of your problem.
>>>
>>> Björn
>>> Am Mittwoch, 30. Oktober 2013, 07:07:41 schrieb Koehne Kai:
>>>
>>>>  > -Original Message-
>>>>  > From: development-bounces+kai.koehne=digia@qt-project.org
>>>>  > [mailto:development-bounces+kai.koehne=digia@qt-project.org] On
>>>>  > Behalf Of Felipe Crochik
>>>>  > Sent: Tuesday, October 29, 2013 7:13 PM
>>>>  > To: Hausmann Simon
>>>>  > Cc: development@qt-project.org
>>>>  > Subject: Re: [Development] Qt 5.2 Beta - is it really much slower to
>>> parse
>>>>  > qml/javascript on android?
>>>>  >
>>>>  > Simon,
>>>>  > Quick update:
>>>>  > I tried arm7va and got almost the same results (a very small
>>> improvement
>>>>  > but still over 3seconds).
>>>>  >
>>>>  > It doesn't seem to be related at all to my code. It seems that it
>>> is
>>>>  > adding some "fixed amount" of time for each component than
>>> has to parse.
>>>>  > It doesn't look like is related to what they are or how complex.
>>> For
>>>>  > instance in one of my tests I had a component that was a Rectangle
>>> with a
>>>>  > Text inside, by just refactoring the Text to become another component
&g

Re: [Development] Qt 5.2 Beta - is it really much slower to parse qml/javascript on android?

2013-10-30 Thread Felipe Crochik
OK. You just nailed it! After moving the files into a resource file the
"startup" went from a little over 4 seconds to less than half second.  Just
for context: my application has 18qml files, 2 small javascript files and
20 or so images and not all of them are loaded on startup!

A little surprising and a lot disappointing is that my main phone (android
4.1.2) seems to make the problem even worst. I tried on a Nexus7 (android
4.3) and a 2+year old HTC inspire (android 4.2.2) and both are much quicker
when not using the resource file (there is the possibility that the actual
android has been improved since both of these devices have newer versions
of it). They are still much slower than using the resource file.

On hindsight:
1. my original qml 1.0 version uses the resource file - didn't occur to me
that this could make such a difference!
2. The Qt 5.1 document on android suggests using the resource (
http://qt-project.org/doc/qt-5.1/qtdoc/android-support.html) and even
states "The most convenient option is to bundle the resources into a qrc
file, which gets built into the application binary. This approach reduces
the porting effort considerably and provides *faster access to the resources
*. It is also a cross-platform approach, which makes porting to other
platforms easier.". For the 5.2 version I think we should make it stand out
with some "big bold red blinking letters (TM)" and also change the wizard
template to use resources by default for android. It can be the difference
between a "useless" application that takes forever to start and "Qt/qml is
really great even on  android"!

Thanks all!
Felipe


On Wed, Oct 30, 2013 at 4:09 AM, BogDan  wrote:

> Hi,
>
> Android's assets are indeed slower (~2X) than Qt's resource system,
> but not that slow ! :)
>
> If I recall correctly in the beginning of this thread Kai said that using
> Necessitas SDK it was ok, and I don't think he is using another technique
>  to store the qml files than he is using for Necessitas. Also the assets
> implementation should be pretty much the same ... unless me (or someone
> else)
> screw the implementation in Qt 5.2 :).
>
> Cheers,
> BogDan.
>
>
>
> >
> > I think i know whats the issue if its still not fixed.
> >
> > My guess is that you don't use the resource system of Qt but the android
> > application assets to store your components, the last time i had issues
> > with this all the time was lost in the horrible slow fileengine for
> assets on
> > android. It looked to me it was reopening the assets all the time which
> seems
> > expensive.
> >
> > I haven't tried it since 5.1 but if it is not fixed its very likely the
> > cause
> > of your problem.
> >
> > Björn
> > Am Mittwoch, 30. Oktober 2013, 07:07:41 schrieb Koehne Kai:
> >
> >>  > -Original Message-
> >>  > From: development-bounces+kai.koehne=digia@qt-project.org
> >>  > [mailto:development-bounces+kai.koehne=digia....@qt-project.org] On
> >>  > Behalf Of Felipe Crochik
> >>  > Sent: Tuesday, October 29, 2013 7:13 PM
> >>  > To: Hausmann Simon
> >>  > Cc: development@qt-project.org
> >>  > Subject: Re: [Development] Qt 5.2 Beta - is it really much slower to
> > parse
> >>  > qml/javascript on android?
> >>  >
> >>  > Simon,
> >>  > Quick update:
> >>  > I tried arm7va and got almost the same results (a very small
> > improvement
> >>  > but still over 3seconds).
> >>  >
> >>  > It doesn't seem to be related at all to my code. It seems that it
> > is
> >>  > adding some "fixed amount" of time for each component than
> > has to parse.
> >>  > It doesn't look like is related to what they are or how complex.
> > For
> >>  > instance in one of my tests I had a component that was a Rectangle
> > with a
> >>  > Text inside, by just refactoring the Text to become another component
> > I
> >>  > went from 1.2s load time to almost 2. The example does not include
> any
> >>  > javascript
> >>
> >>  Have you tried running the app with the QML Profiler attached?
> >>
> >>  See
> >>
> >>
> >
> http://qt-project.org/doc/qtcreator-2.8/creator-qml-performance-monitor.html
> >>
> >>  Regards
> >>
> >>  Kai
> >>
> >>  ___
> >>  Development mailing list
> >>  Development@qt-project.org
> >>  http://lists.qt-project.org/mailman/listinf

Re: [Development] Qt 5.2 Beta - is it really much slower to parse qml/javascript on android?

2013-10-30 Thread Eskil Abrahamsen Blomfeldt
On 10/30/2013 09:09 AM, BogDan wrote:
> Hi,
>
> Android's assets are indeed slower (~2X) than Qt's resource system,
> but not that slow ! :)

 From our experience the Android assets system is *extremely* slow for 
listing large file sets. It's bad to the degree that I suspect it has 
exponential complexity. We're talking actual *minutes* to list a large 
file set (I don't remember the actual count, but it was an actual 
application, not a constructed benchmark.) Note that Qt was not included 
in this test, so the slowness was entirely in the Android APIs.

This is a known issue in the Android community, and the work-around is 
to always bundle a file list for the assets and use that instead of the 
Android APIs. We can easily generate this list in our deployment tool, 
so I'm hoping I have time to fix it for Qt 5.2. Otherwise it should be 
done for Qt 5.2.1.

>
> If I recall correctly in the beginning of this thread Kai said that using
> Necessitas SDK it was ok, and I don't think he is using another technique
>   to store the qml files than he is using for Necessitas. Also the assets
> implementation should be pretty much the same ... unless me (or someone else)
> screw the implementation in Qt 5.2 :).

This could be due to changes in QML. If QtQuick 2 is doing more lookups 
in the file system it would be very visible in assets loading.

The easiest way to find out is to move the assets into qrc. We've done 
this for other cases and it usually fixes the problem. If it doesn't, 
then we need to look elsewhere.

-- Eskil
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Qt 5.2 Beta - is it really much slower to parse qml/javascript on android?

2013-10-30 Thread BogDan
Hi,

Android's assets are indeed slower (~2X) than Qt's resource system,
but not that slow ! :)

If I recall correctly in the beginning of this thread Kai said that using
Necessitas SDK it was ok, and I don't think he is using another technique
 to store the qml files than he is using for Necessitas. Also the assets 
implementation should be pretty much the same ... unless me (or someone else)
screw the implementation in Qt 5.2 :).

Cheers,
BogDan.



> 
> I think i know whats the issue if its still not fixed.
> 
> My guess is that you don't use the resource system of Qt but the android
> application assets to store your components, the last time i had issues
> with this all the time was lost in the horrible slow fileengine for assets on 
> android. It looked to me it was reopening the assets all the time which seems
> expensive.
> 
> I haven't tried it since 5.1 but if it is not fixed its very likely the 
> cause 
> of your problem.
> 
> Björn
> Am Mittwoch, 30. Oktober 2013, 07:07:41 schrieb Koehne Kai:
> 
>>  > -Original Message-
>>  > From: development-bounces+kai.koehne=digia@qt-project.org
>>  > [mailto:development-bounces+kai.koehne=digia@qt-project.org] On
>>  > Behalf Of Felipe Crochik
>>  > Sent: Tuesday, October 29, 2013 7:13 PM
>>  > To: Hausmann Simon
>>  > Cc: development@qt-project.org
>>  > Subject: Re: [Development] Qt 5.2 Beta - is it really much slower to 
> parse
>>  > qml/javascript on android?
>>  > 
>>  > Simon,
>>  > Quick update:
>>  > I tried arm7va and got almost the same results (a very small 
> improvement
>>  > but still over 3seconds).
>>  > 
>>  > It doesn't seem to be related at all to my code. It seems that it 
> is
>>  > adding some "fixed amount" of time for each component than 
> has to parse.
>>  > It doesn't look like is related to what they are or how complex. 
> For
>>  > instance in one of my tests I had a component that was a Rectangle 
> with a
>>  > Text inside, by just refactoring the Text to become another component 
> I
>>  > went from 1.2s load time to almost 2. The example does not include any
>>  > javascript
>> 
>>  Have you tried running the app with the QML Profiler attached?
>> 
>>  See
>> 
>> 
> http://qt-project.org/doc/qtcreator-2.8/creator-qml-performance-monitor.html
>> 
>>  Regards
>> 
>>  Kai
>> 
>>  ___
>>  Development mailing list
>>  Development@qt-project.org
>>  http://lists.qt-project.org/mailman/listinfo/development
> 
> -- 
> Björn Breitmeyer | bjoern.breitme...@kdab.com | Software Engineer
> KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
> Germany: +49-30-521325470, Sweden (HQ): +46-563-540090
> KDAB - Qt Experts - Platform-independent software solutions
> 
> ___
> Development mailing list
> Development@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
> 
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Qt 5.2 Beta - is it really much slower to parse qml/javascript on android?

2013-10-30 Thread Björn Breitmeyer
I think i know whats the issue if its still not fixed.

My guess is that you don't use the resource system of Qt but the android
application assets to store your components, the last time i had issues
with this all the time was lost in the horrible slow fileengine for assets on
android. It looked to me it was reopening the assets all the time which seems
expensive.

I haven't tried it since 5.1 but if it is not fixed its very likely the cause
of your problem.

Björn
Am Mittwoch, 30. Oktober 2013, 07:07:41 schrieb Koehne Kai:
> > -Original Message-
> > From: development-bounces+kai.koehne=digia@qt-project.org
> > [mailto:development-bounces+kai.koehne=digia@qt-project.org] On
> > Behalf Of Felipe Crochik
> > Sent: Tuesday, October 29, 2013 7:13 PM
> > To: Hausmann Simon
> > Cc: development@qt-project.org
> > Subject: Re: [Development] Qt 5.2 Beta - is it really much slower to parse
> > qml/javascript on android?
> >
> > Simon,
> > Quick update:
> > I tried arm7va and got almost the same results (a very small improvement
> > but still over 3seconds).
> >
> > It doesn't seem to be related at all to my code. It seems that it is
> > adding some "fixed amount" of time for each component than has to parse.
> > It doesn't look like is related to what they are or how complex. For
> > instance in one of my tests I had a component that was a Rectangle with a
> > Text inside, by just refactoring the Text to become another component I
> > went from 1.2s load time to almost 2. The example does not include any
> > javascript
>
> Have you tried running the app with the QML Profiler attached?
>
> See
>
> http://qt-project.org/doc/qtcreator-2.8/creator-qml-performance-monitor.html
>
> Regards
>
> Kai
>
> ___
> Development mailing list
> Development@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development

--
Björn Breitmeyer | bjoern.breitme...@kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Germany: +49-30-521325470, Sweden (HQ): +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions

smime.p7s
Description: S/MIME cryptographic signature
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Qt 5.2 Beta - is it really much slower to parse qml/javascript on android?

2013-10-30 Thread Koehne Kai


> -Original Message-
> From: development-bounces+kai.koehne=digia@qt-project.org
> [mailto:development-bounces+kai.koehne=digia@qt-project.org] On
> Behalf Of Felipe Crochik
> Sent: Tuesday, October 29, 2013 7:13 PM
> To: Hausmann Simon
> Cc: development@qt-project.org
> Subject: Re: [Development] Qt 5.2 Beta - is it really much slower to parse
> qml/javascript on android?
> 
> Simon,
> Quick update:
> I tried arm7va and got almost the same results (a very small improvement
> but still over 3seconds).
> 
> It doesn't seem to be related at all to my code. It seems that it is adding 
> some
> "fixed amount" of time for each component than has to parse. It doesn't look
> like is related to what they are or how complex. For instance in one of my
> tests I had a component that was a Rectangle with a Text inside, by just
> refactoring the Text to become another component I went from 1.2s load
> time to almost 2. The example does not include any javascript

Have you tried running the app with the QML Profiler attached?

See

http://qt-project.org/doc/qtcreator-2.8/creator-qml-performance-monitor.html

Regards

Kai 

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Qt 5.2 Beta - is it really much slower to parse qml/javascript on android?

2013-10-29 Thread Simon Hausmann
On Tuesday 29. October 2013 11.12.07 Felipe Crochik wrote:
> Hi Simon,
> Thank you for your reply, here are the answers to your questions:
> 1. I am using
> qt-windows-opensource-5.2.0-beta1-android-x86-win32-offline_2013-10-22_08-54
> -34-108.exe 2. using arm5 (don't think the device I am testing, lg optimus g
> pro, supports arm7va)

Ok. That's good.

As far as Wikipedia tells, your processor should support ARMv7. Can you try 
doing an ARMv7 build and let us know if this makes any difference to your test 
case or not?

(This helps isolating things down between the JIT or the Interpreter, the 
former is only used with ARMv7)

> 3. not importing any large javascript. I import a 65 lines long javascript
> in one component and other than the typical handling of events I have 2
> other functions defined inside a component that add up to 100lines of
> javascript

Ok!

> 4. I think it has to be the component instantiation. I have a very simple
> qml with a mousearea and a loader. the mousearea onclick sets the source of
> the loader to what used to be my main.qml file. I am measuring the time
> between just before setting the source of the loader and on executing the
> Component.OnCompleted in the main.qml top component. No other component has
> a OnCompleted handler so if any code is ran before the oncompleted is on
> the bindings.
> 
> The code is really simple. I will break it apart and see if I can isolate
> the cause.

Would be great if you can somehow create a simple test-case for us. I'm pretty 
sure that we can fix this :)


Simon

> On Tue, Oct 29, 2013 at 10:40 AM, Simon Hausmann
> 
> wrote:
> > On Tuesday 29. October 2013 10.31.16 Felipe Crochik wrote:
> > > summary: some very simple "qml" code now is taking 4 seconds to "parse"
> > 
> > and
> > 
> > > get to the "component.onCompleted" on android. It is instantaneous using
> > > qml 1.0/old necessitas. What is the best way to profile and found why?
> > > Anybody seeing a much longer "parsing time"? can it be related to the
> > > replacement of V8?
> > 
> > Quite likely, and also quite likely to be a bug :)
> > 
> > Can you elaborate a bit on some details? I'd be curious about the
> > following:
> > 
> > * From when is your build of Qt?
> > * Is this a build for ARMv7 or older?
> > * Are you importing bigger pieces of JavaScript using import? (nothing bad
> > about it, merely curious)
> > * Can you help us identify if is it the type instantiation that is slow or
> > the
> > execution of Component.onCompleted itself? I.e. if you add a console.log
> > at
> > the beginning of Component.onCompleted, does it take 4s until you see that
> > message or does it take 4s _after_ seeing it?
> > 
> > 
> > 
> > Simon
> > 
> > > longer version:
> > > I have this very simple game (
> > > https://play.google.com/store/apps/details?id=com.crochik.lockcode)
> > 
> > that I
> > 
> > > had created using qml 1.0 and deployed to android using one of the alpha
> > > releases of necessitas/qml 1.0. The game is just qml and javascript,
> > 
> > using
> > 
> > > only basic qml components.
> > > 
> > > I just created a new "qt quick 2.0" project, copied the qml files to the
> > > project and changed the "headers"  to use qt quick 2.0 (instead of 1)
> > > and
> > > now it takes 4 seconds to "parse the qml" and get to the top level
> > > component.oncompleted. I am using a loader to "measure" the time between
> > > setting the loader source and getting to the "oncompleted" on the
> > > "loaded
> > > top level component"
> > > 
> > > Thanks,
> > > Felipe

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Qt 5.2 Beta - is it really much slower to parse qml/javascript on android?

2013-10-29 Thread Simon Hausmann
On Tuesday 29. October 2013 10.31.16 Felipe Crochik wrote:
> summary: some very simple "qml" code now is taking 4 seconds to "parse" and
> get to the "component.onCompleted" on android. It is instantaneous using
> qml 1.0/old necessitas. What is the best way to profile and found why?
> Anybody seeing a much longer "parsing time"? can it be related to the
> replacement of V8?

Quite likely, and also quite likely to be a bug :)

Can you elaborate a bit on some details? I'd be curious about the following:

* From when is your build of Qt?
* Is this a build for ARMv7 or older?
* Are you importing bigger pieces of JavaScript using import? (nothing bad 
about it, merely curious)
* Can you help us identify if is it the type instantiation that is slow or the 
execution of Component.onCompleted itself? I.e. if you add a console.log at 
the beginning of Component.onCompleted, does it take 4s until you see that 
message or does it take 4s _after_ seeing it?



Simon
 
> longer version:
> I have this very simple game (
> https://play.google.com/store/apps/details?id=com.crochik.lockcode) that I
> had created using qml 1.0 and deployed to android using one of the alpha
> releases of necessitas/qml 1.0. The game is just qml and javascript, using
> only basic qml components.
> 
> I just created a new "qt quick 2.0" project, copied the qml files to the
> project and changed the "headers"  to use qt quick 2.0 (instead of 1) and
> now it takes 4 seconds to "parse the qml" and get to the top level
> component.oncompleted. I am using a loader to "measure" the time between
> setting the loader source and getting to the "oncompleted" on the "loaded
> top level component"
> 
> Thanks,
> Felipe

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


[Development] Qt 5.2 Beta - is it really much slower to parse qml/javascript on android?

2013-10-29 Thread Felipe Crochik
summary: some very simple "qml" code now is taking 4 seconds to "parse" and
get to the "component.onCompleted" on android. It is instantaneous using
qml 1.0/old necessitas. What is the best way to profile and found why?
Anybody seeing a much longer "parsing time"? can it be related to the
replacement of V8?

longer version:
I have this very simple game (
https://play.google.com/store/apps/details?id=com.crochik.lockcode) that I
had created using qml 1.0 and deployed to android using one of the alpha
releases of necessitas/qml 1.0. The game is just qml and javascript, using
only basic qml components.

I just created a new "qt quick 2.0" project, copied the qml files to the
project and changed the "headers"  to use qt quick 2.0 (instead of 1) and
now it takes 4 seconds to "parse the qml" and get to the top level
component.oncompleted. I am using a loader to "measure" the time between
setting the loader source and getting to the "oncompleted" on the "loaded
top level component"

Thanks,
Felipe
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development