Re: [OT] What can Nuitka do?

2014-06-30 Thread Michael Torrie
On 06/28/2014 09:16 AM, Chris Angelico wrote:
 I remember approx. 10 years ago a neighboring dept. at my work effectively
 killed our 10 MB/s Ethernet segment with such traffic (due to a
 misconfigured switch/router?). Running an ethernet analyzer showed a single
 X11 host-server session occupied ~80% bandwidth.  AFAICR, it was a Sun
 workstation.
 A real PITA.
 
 Either that was a horribly inefficient X11 connection (as mine was -
 the virtual machine sent basically a constantly-updated bitmapped
 image to rdesktop, which then couldn't do anything more efficient than
 feed that image to the X server), or something was horribly
 misconfigured. I've frequently done much more reasonable X11
 forwarding, with high success and low traffic;

Only the most primitive X11 apps are at all fast over network
forwarding.  If the app uses any modern toolkit, then it's basically
just sending a bunch of bitmaps over the wire (changes), which would be
fine, but X11 involves a lot of server round trips.  Forwarding works
fine over SSH on a LAN (compression with -X helps too), but anything
slower than that is very nearly unusable.  I used to run XEmacs over a
modem (I know; I just preferred it to Emacs and I didn't know ViM), and
it worked great with server-side drawing and fonts, as X11 was designed
to do 90s-style.  But now if I need to run X11 apps over a slower link
these days I use OpenNX which dramatically helps by eliminating round
trips, and applying bitmap compression.  But the fact remains X11 kind
of sucks these days, and network transparency now basically means a
slightly suckier version of VNC in effect.  RDP protocol is actually
much more efficient than X11 forwarding with modern apps.  So your
rdesktop example is actually not a horribly inefficient X11 connection,
other than the fact that X11 is inefficient.  Honestly once Wayland has
per-app RDP built into it, there'll be no reason at all to cheer for X11.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [OT] What can Nuitka do?

2014-06-30 Thread Chris Angelico
On Mon, Jun 30, 2014 at 11:10 PM, Michael Torrie torr...@gmail.com wrote:
 Only the most primitive X11 apps are at all fast over network
 forwarding.  If the app uses any modern toolkit, then it's basically
 just sending a bunch of bitmaps over the wire (changes), which would be
 fine, but X11 involves a lot of server round trips.  Forwarding works
 fine over SSH on a LAN (compression with -X helps too), but anything
 slower than that is very nearly unusable.  I used to run XEmacs over a
 modem (I know; I just preferred it to Emacs and I didn't know ViM), and
 it worked great with server-side drawing and fonts, as X11 was designed
 to do 90s-style.  But now if I need to run X11 apps over a slower link
 these days I use OpenNX which dramatically helps by eliminating round
 trips, and applying bitmap compression.  But the fact remains X11 kind
 of sucks these days, and network transparency now basically means a
 slightly suckier version of VNC in effect.  RDP protocol is actually
 much more efficient than X11 forwarding with modern apps.  So your
 rdesktop example is actually not a horribly inefficient X11 connection,
 other than the fact that X11 is inefficient.  Honestly once Wayland has
 per-app RDP built into it, there'll be no reason at all to cheer for X11.

Hmm. I'm not sure that it's necessarily that bad; I've done 3G-based
X11 forwarding fairly successfully on occasion. Yes, it's potentially
quite slow, but it certainly works - I've used SciTE, for instance,
and I've used some GTK2 apps without problems. What do you mean by
modern toolkit?

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [OT] What can Nuitka do?

2014-06-30 Thread Michael Torrie
On 06/30/2014 07:36 AM, Chris Angelico wrote:
 Hmm. I'm not sure that it's necessarily that bad; I've done 3G-based
 X11 forwarding fairly successfully on occasion. Yes, it's potentially
 quite slow, but it certainly works - I've used SciTE, for instance,
 and I've used some GTK2 apps without problems. What do you mean by
 modern toolkit?

Modern toolkit is defined as anything that uses client-side rendering.
In the good old days of Motif and Xaw widgets, if a program wanted to
draw, the toolkit would instruct the server to draw primitives.
Rectangles, lines, etc.  Each widget would be created in its own window,
and events would be all handled on the server.  Unfortunately we quickly
hit some limits with that idea, as good and fast as it was.  First of
all, anti-aliased fonts were difficult to accomplish.  There were hacks
to do this early on, but it quickly became apparent that the actual
application could do a better job of it if it would just do the
rendering itself and have the X server draw it.  Not only anti-aliased
fonts, but also when you start talking about wanting to do layered
effects like alpha-blending.  All of this the app could do better and
more efficiently than the X server could, since the X server would have
had to round-trip to the app anyway to get the information since the X
server is in a different process (or different computer) and cannot
access the memory the app is using to store things.  Kieth Packard wrote
some X extensions to allow client-side rendering to be efficient and to
let the X server to handle RGBA images, and to composite them together.

Also, events in modern toolkits are done very differently than the
original X toolkits.  Instead of using multiple windows, clients now
just establish one window and then handle events and figure out what
widgets should receive the events client-side instead of server-side.
This allows handling of things like scrollable canvases.

Anyway, all of this improved the behavior and appearance of
applications.  When used locally, shared memory facilities make X pretty
fast, although latency is still quite high. There's no way to
synchronize frame redraws, so apps tear and stutter when you drag and
resize.  But over a network now, the nature of the X protocol means a
lot of round-trips to the server to do things. This is very apparent
when you run on a very slow connection. You might see widgets get drawn,
then erase, then drawn again.  Using a complex app like firefox, which
has another layer of abstraction over GTK that makes it even worse, is
very difficult on anything less than a LAN.  Or try a Java Swing app!
I've done it on occasion. I'd rather run Xvnc on the remote host and vnc
in than forward X.

FreeNX makes things very usable.
http://en.wikipedia.org/wiki/NX_technology describes how NX works.

I love that X11 apps work over a forward connection.  And I love that I
can run a remote window manager on a local X server if I wanted to.  But
I recognize X has it's problems and I can see how Wayland will
eventually be so much better while still letting me remote apps, which
is essential to me.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [OT] What can Nuitka do?

2014-06-30 Thread Michael Torrie
I highly recommend the talk by Daniel Stone who used to be a core X.org
developer.  He explains it quite well how X is used currently, and why
it has problems and why they are considered so hard to fix that Wayland
(and Mir) was created.

https://www.youtube.com/watch?v=RIctzAQOe44

One interesting point he made was the X server is no longer network
transparent like it used to be.  It is network capable now but when used
in that way (ssh forwarding), it's essentially done in the same way as
VNC, but more poorly because of the way X11 is architected.
-- 
https://mail.python.org/mailman/listinfo/python-list