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

Felipe Crochik qt-project at b2-4ac.com
Tue Oct 29 16:12:07 CET 2013


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)
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
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.
Felipe


On Tue, Oct 29, 2013 at 10:40 AM, Simon Hausmann
<simon.hausmann at digia.com>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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20131029/a19d0f7f/attachment.html>


More information about the Development mailing list