We have moved to a new Sailfish OS Forum. Please start new discussions there.
19

Sailfish SDK: deployment is excessively slow

asked 2014-04-14 14:48:57 +0300

Venemo gravatar image

updated 2014-04-14 14:49:09 +0300

I've been having trouble with this since November, and it seems to me that it has only gotten worse since.
Whenever I deploy my app from Qt Creator by building an RPM package, it is extremely slow. Building the package and then copying and installing it takes several minutes (especially copying and installing).

NOTE: while the "deploy by copying binaries" mode is slightly faster, it's still quite slow.

Why am I mentioning this?

Speed of deployment is a very important aspect of developer experience. For example, I like to test my code much, so I usually run the app on-device after every change I make.
Unfortunately, deploying the app takes longer than how long it took to change a few lines... this is absurd.

(I hate to say this, but please take a look at how long it takes to deploy an app from the Windows Phone SDK. It launches in a few seconds.)

edit retag flag offensive close delete

Comments

The Meego SDK for the N9 has a simulator, which in my limited experience works great and fast. Apps starts within 2 seconds, and QML-files often can be edited while running. The simulator lessened the need for fast deploy times, as you'd simply need to deploy rarely. From what I understand, such simulator for Jolla is in the works. Still, I count my blessings with the current SDK: deploying with Xamarin/Android and Windows Mobile 6 (!) is a much less happy experience...

Fuzzillogic ( 2014-04-15 23:11:57 +0300 )edit

@Fuzzillogic I don't want an emulator / simulator. I just want a fast way to deploy to my device.

Venemo ( 2014-04-16 12:31:17 +0300 )edit

3 Answers

Sort by » oldest newest most voted
3

answered 2014-04-14 15:25:52 +0300

lbt gravatar image

I upvoted and I agree. This is not an answer but it's too long for a comment :)

The SDK deploy process is (roughly, from memory):

  • Run qmake on VM if needed
  • Run make on VM
  • Run make install on VM
  • Rsync install dir to device (minimal data xfer)
  • Execute command

This should be very very fast for no-ops and should work reliably for all changes with no special support effort needed in QtCreator.

Problems:

  • QtCreator has problems determining if qmake needs running and always runs it
  • running both make and make install is a problem but QtCreator treats build and deploy as a 2-step process
  • AFAIUI ssh setup is slow (should be instantaneous)
  • actual execution is not (afaiui) boosted so is also slower than normal (but that's unavoidable I think)
  • the rpmbuild install phase does some debug symbol checking which may or may not be needed. I think it probably helps to maintain a consistent debug ability.

When I was looking at the design the roadmap said that QtCreator would support the ability to have a custom set of build/deploy steps for .pro projects. I don't think that materialised and I think it is now due in 3.0. That should solve the dual make/make install problem.

My suggestion is to profile the steps and optimise them. There's no reason this should not be very fast.

Also IMHO there should be a go-faster 'make install-with-no-rebuild' target which just copies updated QML/assets to the local installroot and rsyncs that.

edit flag offensive delete publish link more

Comments

1

I wonder when will the Emulator OS image will be updated to more current version of the OS and will we be able to use qt creator 3.0 to develop for Jolla

Mariusmssj ( 2014-04-14 15:49:12 +0300 )edit
1

answered 2014-04-14 15:13:19 +0300

Acce gravatar image

In case you're developing on linux, this: https://katastrophos.net/andre/blog/2014/03/29/running-sailfishos-build-engine-outside-virtualbox-vm/ it makes it number of times faster in my experience. If you're on an other OS, no ideas :/

edit flag offensive delete publish link more

Comments

I commented about unshare on the post - I think he must have missed when I said it in irc,

Extending the Mer Platform sdk chroot to suport this would be cool As would patches to the SDK plugin to make less assumptions about the VM

lbt ( 2014-04-14 16:16:48 +0300 )edit

@lbt hmm.. I don't understand what you mean, the unshare is used on the line of 13 of his script, and it looks pretty much the same as the lines you pointed in your link in the blog comments. Is there something else to it?

Acce ( 2014-04-14 21:37:24 +0300 )edit

haha - my bad. It was either missing or I missed it the first time I looked and I never got round to commenting so when I saw all the umounts in cleanup() which obviously aren't needed in a unshare based approach I assumed it was not there.

lbt ( 2014-04-14 22:41:16 +0300 )edit
0

answered 2014-04-15 23:17:29 +0300

Mariusmssj gravatar image

This might help :) Optimal Sailfish SDK workflow with QML auto-reloading

edit flag offensive delete publish link more

Comments

I don't put QML files in the file system, so it doesn't help.

Venemo ( 2014-04-16 12:32:26 +0300 )edit
Login/Signup to Answer

Question tools

Follow
3 followers

Stats

Asked: 2014-04-14 14:48:57 +0300

Seen: 792 times

Last updated: Apr 15 '14