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

Simon Hausmann simon.hausmann at digia.com
Tue Oct 29 16:32:49 CET 2013


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
> 
> <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




More information about the Development mailing list