Is Python really a good choice for mobile device?
Michael 'Mickey' Lauer
mickey at vanille-media.de
Fri Oct 24 15:53:59 CEST 2008
> I'm going to start developing for Openmoko, but there is one question
> that is bothering me for quite a log time - is Python really good
> choice for mobile device?
That depends on 'for whom':
* For you? If you like Python, yes. If not, probably not, feel free to
chose any other language available that you see fit.
* For Openmoko? Yes, absolutely. That way we can quickly prototype our
ideas for next-generation mobile devices.
> Python has to load an instance of python for every script. What about
> starting time of an application and memory consumption?
Startup time is an issue, but you can always "cheat" by having multiple
programs sharing one Python interpreter.
> Is speed an issue for Python programs on Openmoko?
Not really. The dbus framework seems snappy, e.g in ogsmd time is spent
waiting for the modem, not on Python. Python's C modules are doing most
the hard work.
> I'm especially interested in this question after I had used Dillo
> browser. Any other even smallest application on OM is slower than
> entire browser. Why is it so? Is it use of C or FLTK?
Dillo is heavily optimized and uses a very lean toolkit.
> Please don't get me wrong - I love Python, and try to use it a lot on
> my host comp, but there CPU and memory i not an issue.
Compiled programs will often outperform their counterparts in Python;
Once you start profiling and optimizing your algorithms though, combined
with -- say -- replacing the 10 most called functions with their
C-counterparts, you may find it being fast enough. Which is what
Always remember that -- although this still is an "embedded system", it
has the processing power and internal memory that we used to have on our
desktops only a couple of years ago.
More information about the devel