Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #73697
| References | (1 earlier) <mailman.11296.1403912691.18130.python-list@python.org> <d27f4a04-55d5-4d48-ba7d-3b471e03a374@googlegroups.com> <53ae31d6$0$29985$c3e8da3$5496439d@news.astraweb.com> <2f8d99b4-7a0b-47bf-8980-41f51cf7a9e7@googlegroups.com> <53AE411A.2080808@gmail.com> |
|---|---|
| Date | 2014-06-28 15:00 +1000 |
| Subject | Re: What can Nuitka do? |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.11303.1403931628.18130.python-list@python.org> (permalink) |
On Sat, Jun 28, 2014 at 2:14 PM, Michael Torrie <torriem@gmail.com> wrote: > On 06/27/2014 09:44 PM, CM wrote: >>> Additionally, in most GUI apps (although not all), >>> the main bottleneck is usually not the programming >>> language but the user. GUI apps tend to spend >>> 95% of their time idling, waiting for the user. Its >>> been a *long* time since the GUI framework itself >>> has lagged behind the user's input, except >> >> Although that is true, I have found that I have >> managed to get wxPython apps to feel laggy in certain >> parts, particularly on not-very-fast computers. I >> can see this in starting up the program and some >> other areas such as repainting damaged windows >> rapidly. It's not a huge effect, but it does >> influence the "look and feel" and I care about it. > > I highly doubt this lagginess has anything to do with Python, honestly. > If you're seeing slowdowns in the areas you state, you'll probably > experience the same issues in the equivalent C++ version. All drawing > is done by the underlying binary library. > > I've made GUIs in GTK and Qt with Python and never had any that was > appreciably slower than C or C++ apps. Agreed, and there's a fairly easy way to test it (at least, under Linux): just look in 'top' and see if a significant proportion of the time is spent in a process called Xorg rather than your python process. The last time I had a program that could actually saturate a thread with GUI API calls, it generally ended up split somewhere between 25% and 75% across my process and Xorg. (Best I could do just now, in testing, was to hold PgUp/PgDn in an unoptimized program that repainted the screen immediately whenever it needed to. According to top, I was using 52% of a core in Xorg, and about 16% of a core in my code. With a slower computer, that would work out to 75% Xorg and 25% high level code.) At that point, changing language won't affect performance one iota, and certainly changing Python interpreter won't do anything for you. The way to improve performance is to cut out some of the drawing calls. (The saturation problem came because the code was naively trying to draw a whole lot of stuff that was hidden behind a scroll viewport. Adding a quick check "is this sorta close to the screen" gave me all the improvement I needed.) The only other time I've been waiting for X display was when I was mobile, on a 3G connection, and using X11 forwarding on an SSH link back to my home LAN. For some reason, displaying a remote desktop view of a VM takes quite a while when every pixel has to be sent over 3G... but, again, no Python code performance involved :) ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
What can Nuitka do? CM <cmpython@gmail.com> - 2014-06-27 16:25 -0700
Re: What can Nuitka do? Paul Sokolovsky <pmiscml@gmail.com> - 2014-06-28 02:44 +0300
Re: What can Nuitka do? Rustom Mody <rustompmody@gmail.com> - 2014-06-27 19:10 -0700
Re: What can Nuitka do? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-06-28 03:09 +0000
Re: What can Nuitka do? CM <cmpython@gmail.com> - 2014-06-27 20:44 -0700
Re: What can Nuitka do? Michael Torrie <torriem@gmail.com> - 2014-06-27 22:14 -0600
Re: What can Nuitka do? Chris Angelico <rosuav@gmail.com> - 2014-06-28 15:00 +1000
Re: What can Nuitka do? "Gisle Vanem" <gvanem@yahoo.no> - 2014-06-28 12:39 +0200
Re: What can Nuitka do? Roy Smith <roy@panix.com> - 2014-06-28 11:35 -0400
Re: What can Nuitka do? Chris Angelico <rosuav@gmail.com> - 2014-06-29 01:16 +1000
Re: [OT] What can Nuitka do? Michael Torrie <torriem@gmail.com> - 2014-06-30 07:10 -0600
Re: [OT] What can Nuitka do? Chris Angelico <rosuav@gmail.com> - 2014-06-30 23:36 +1000
Re: [OT] What can Nuitka do? Michael Torrie <torriem@gmail.com> - 2014-06-30 22:17 -0600
Re: [OT] What can Nuitka do? Michael Torrie <torriem@gmail.com> - 2014-06-30 22:26 -0600
Re: What can Nuitka do? CM <cmpython@gmail.com> - 2014-06-27 20:06 -0700
Re: What can Nuitka do? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-06-28 03:17 +0000
Re: What can Nuitka do? CM <cmpython@gmail.com> - 2014-06-27 20:57 -0700
Re: What can Nuitka do? Rustom Mody <rustompmody@gmail.com> - 2014-06-27 21:11 -0700
Re: What can Nuitka do? Stefan Behnel <stefan_ml@behnel.de> - 2014-06-28 06:23 +0200
Re: What can Nuitka do? CM <cmpython@gmail.com> - 2014-06-27 21:45 -0700
Re: What can Nuitka do? Chris Angelico <rosuav@gmail.com> - 2014-06-28 15:02 +1000
Re: What can Nuitka do? CM <cmpython@gmail.com> - 2014-06-27 22:40 -0700
Re: What can Nuitka do? Chris Angelico <rosuav@gmail.com> - 2014-06-28 16:16 +1000
Fwd: What can Nuitka do? Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2014-06-28 09:45 +0200
Re: What can Nuitka do? Michael Torrie <torriem@gmail.com> - 2014-06-27 21:28 -0600
Re: What can Nuitka do? Rustom Mody <rustompmody@gmail.com> - 2014-06-27 20:40 -0700
csiph-web