maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   Sailfish SDK version 1608 (2.0.2) Qt5 released (https://talk.maemo.org/showthread.php?t=89294)

xerxes2 2013-10-12 12:32

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by mikecomputing (Post 1380019)
what Qt C++ API do you need to access from Python when you almost can access the most via QML? and other sutable libs in python or via pyotherside?

For me personally not that much but porting from Pyside to Pyotherside will require a lot of work anyway. Porting from Pyside to Pyqt5 is very easy as shown below:

Pyside: https://github.com/xerxes2/panucci/b...lui/qmlmain.py

Pyqt5: https://github.com/xerxes2/panucci/b...ui/qml2main.py

As I said I'm not using much Qt stuff other than Quick but porting to Pyotherside will still, if even possible, require a lot of work. Pyqt maps 1:1 with the C++ API and is very easy to use if you already used Pyside before.

And would you care to explain why Pyotherside would use less resources than Pyqt? They're both using the same Qt libs so give some proof or it didn't happen. :P Use Pyotherside if you want but for existing Pyside apps Pyqt is the much faster way to port. Pyqt is GPL3 though so your app must use that license too or you must purchase a commercial license.

Edit: Just to clarify, porting from Pyside to Pyqt5 is basically namespace changes but porting to Pyotherside will require a complete rewrite of your gui and some more stuff. I've never used Pyotherside so someone correct me if I'm wrong.

mattaustin 2013-10-12 12:38

Re: Sailfish SDK Alpha Qt5 released
 
I've just ported my "Perth Trains" app to pyotherside. It's probably a bit hacky (I struggled with knowing which data types pyotherside will handle, a list of instances didn't work, but a list of dicts apparently does), and I plan to also port to pyqt at some point (just out of self-interest, and I already use pyside for fremantle/harmattan):

https://github.com/mattaustin/freman...f675729e773f35

mikecomputing 2013-10-12 13:26

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by xerxes2 (Post 1380152)
For me personally not that much but porting from Pyside to Pyotherside will require a lot of work anyway. Porting from Pyside to Pyqt5 is very easy as shown below:

Pyside: https://github.com/xerxes2/panucci/b...lui/qmlmain.py

Pyqt5: https://github.com/xerxes2/panucci/b...ui/qml2main.py

As I said I'm not using much Qt stuff other than Quick but porting to Pyotherside will still, if even possible, require a lot of work. Pyqt maps 1:1 with the C++ API and is very easy to use if you already used Pyside before.

And would you care to explain why Pyotherside would use less resources than Pyqt? They're both using the same Qt libs so give some proof or it didn't happen. :P Use Pyotherside if you want but for existing Pyside apps Pyqt is the much faster way to port. Pyqt is GPL3 though so your app must use that license too or you must purchase a commercial license.

Edit: Just to clarify, porting from Pyside to Pyqt5 is basically namespace changes but porting to Pyotherside will require a complete rewrite of your gui and some more stuff. I've never used Pyotherside so someone correct me if I'm wrong.

THP has already pointed that out in a blog post. pyotherside does not load Qt via Python. This means it has not to lookup all Qt methods in python. Its actually other way around. Python is loaded from Qt thats atleast for now makes it alpot faster startup.

Morpog 2013-10-12 13:43

Re: Sailfish SDK Alpha Qt5 released
 
Performance comparision by THP himself on QtDevDays 2013
https://pbs.twimg.com/media/BWHgLHNIEAANIuf.jpg:large


Some other pics from there:
https://pbs.twimg.com/media/BWHizsjIIAAnX6v.jpg:large https://pbs.twimg.com/media/BWHfNSmIIAA_LEu.jpg:large https://pbs.twimg.com/media/BWHizsjIIAAnX6v.jpg:large https://pbs.twimg.com/media/BWHo-wnIQAALBYs.jpg:large https://pbs.twimg.com/media/BWHeAnkIcAAgS-W.jpg:large

xerxes2 2013-10-12 15:34

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by mikecomputing (Post 1380167)
THP has already pointed that out in a blog post. pyotherside does not load Qt via Python. This means it has not to lookup all Qt methods in python. Its actually other way around. Python is loaded from Qt thats atleast for now makes it alpot faster startup.

That's not proof, only talk. :p Also what's the point of seeing the gui faster if you can't use it until the rest of your app is loaded? A hello world Pyqt5/QML takes less than 2mb on my box and I really can't see a problem with that.

Edit: Hm, that should be less than 20mb ... still not extremely much. So it probably takes "a bit" more than Pyotherside.

Edit2: If I'm counting correctly a hello world pyqt5 takes around 14mb.

Edit3: Are you supposed to use qmlscene with pyotherside? Because that will use the same amount of memory as pyqt.

xerxes2 2013-10-12 15:37

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by mattaustin (Post 1380154)
I've just ported my "Perth Trains" app to pyotherside. It's probably a bit hacky (I struggled with knowing which data types pyotherside will handle, a list of instances didn't work, but a list of dicts apparently does), and I plan to also port to pyqt at some point (just out of self-interest, and I already use pyside for fremantle/harmattan):

https://github.com/mattaustin/freman...f675729e773f35

If you do port it to Pyqt5 too you can make a real world comparison between the two ports and check memory usage.

mikecomputing 2013-10-12 20:27

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by xerxes2 (Post 1380196)
That's not proof, only talk. :p Also what's the point of seeing the gui faster if you can't use it until the rest of your app is loaded? A hello world Pyqt5/QML takes less than 2mb on my box and I really can't see a problem with that.

Edit: Hm, that should be less than 20mb ... still not extremely much. So it probably takes "a bit" more than Pyotherside.

Edit2: If I'm counting correctly a hello world pyqt5 takes around 14mb.

Edit3: Are you supposed to use qmlscene with pyotherside? Because that will use the same amount of memory as pyqt.

Talk? well I trust in the fact he points out in the blog and also the fact that python apps has dogslow startup on N9. But if you still beleive pyQT is faster or better then its upto you but so far you have nothing that convince me that PyQt is a good idea on embedded platforms.

Also there is other reason I prefer the later. That is license issues...

Btw if gpodder who has ALOT of pythonqt code can be converted I think other apps can be.

rcolistete 2013-10-13 03:14

Re: Sailfish SDK Alpha Qt5 released
 
As thp says in his blog article about PyOtherSide :
Quote:

I've brought down startup time of gPodder on the N9 down from ~ 12 seconds (using Python 2 and PySide) to ~ 3 seconds (using Python 3.3 and the lightweight "PyOtherSide" approach)
So it seems PyOtherSide is lighter to install and load than PyQt/PySide.

But developers want and need freedom and options. Let remember that many Python mobile developers have only some hours per week or month to develop as a hobby, so if there are tools easier to migrate (from Maemo/MeeGo/PC) to Sailfish, they will want them. Some of the Python softwares could be developed in C/C++, but then it would take more developing time and some would not be finished at all.

And please, stop saying mobile Python developers are lazy. They contributed and will contribute with a lot of free and open source softwares for Maemo, MeeGo, Sailfish, etc.

mikecomputing 2013-10-13 09:56

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by rcolistete (Post 1380283)
As thp says in his blog article about PyOtherSide :

So it seems PyOtherSide is lighter to install and load than PyQt/PySide.

But developers want and need freedom and options. Let remember that many Python mobile developers have only some hours per week or month to develop as a hobby, so if there are tools easier to migrate (from Maemo/MeeGo/PC) to Sailfish, they will want them. Some of the Python softwares could be developed in C/C++, but then it would take more developing time and some would not be finished at all.

And please, stop saying mobile Python developers are lazy. They contributed and will contribute with a lot of free and open source softwares for Maemo, MeeGo, Sailfish, etc.

As I already said. OpenSource is about contribute if main coders has no time I could definitivly understand that. But thing is there is so many people here bashing about XYZ and why is not that Open source why is not Jolla HW good enought and so on. Now if that time could be used on making apps/port apps etc it would be better for all.

There is also other stuff that may involve porting. Going from Python2 => python3.

And btw. We definitively not need too many alternatives librarys IMHO. Especially not on embedded linux.

It only leads to massive package dependies hell that we know of in the Linux on desktop :(

MartinK 2013-10-13 10:43

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by mikecomputing (Post 1380329)
And btw. We definitively not need too many alternatives librarys IMHO. Especially not on embedded linux.

Ever heard about using the best tool for the job ?
You can never have enough libraries available - library availability is what makes or breaks a platform for developers.

Also the more libraries are are available in the repositories, the less crap developers have to bundle, meaning smaller packages and less security vulnerabilities caused by outdated bundled libs.


All times are GMT. The time now is 11:33.

vBulletin® Version 3.8.8