Nested procedures into X12

SÅ‚awomir Lach slawek at lach.art.pl
Mon Jun 15 00:46:46 PDT 2015


I would like to suggest something, which could improve speed of X12
protocol and maybe XServer too. My suggestions is the same idea, which
makes databases works faster, OpenGL(via commands list) works faster
and NoMachine NX works faster: nested procedures.

Nested procedures will have four kind of signals. One to define nested
procedure for current application, second to define nested procedure
globally,third to call nested procedure and last to obtain it of nested
procedure from string.

1. Define nested procedure locally
Application  must pass nested procedure name, such like
gtk_draw_button, signature like (window parent_to_paint, int x, int y,
int with, int height, string text) -- of course, if button is a window,
then we must only declare nested procedure with signature (window
paint_on, string text), but I decided to give more complete example of
parameters type. Of course, application must pass instructions(which
will be compressed text).

Nested procedure defined locally are only accessible for application
and cannot access to any variable outside nested procedure scope.

2. Define nested procedure globally
Applications which special privileges, such like window managers, could
define global nested procedures. One differences between message to
define nested procedure locally and globally is that globally nested
procedures could be invoked by events, like window created, etc. If
nested procedure is invoked by event, then it cannot be called by
application. Global nested procedures could been called extensions.

3. Third message is to call nested procedure
This message contains nested procedure number and parameters values.
Application must achieve number by last message.

4. Getting nested procedure id
This message will create message to application contains name given in
this message and number of nested procedure, which name application
asks for. One parameter to this message is name of nested procedure.


I don't know, which language you will select to writing nested
procedures. I think, that my idea could improve speed of data exchange
over network. It could also improve speed of X subsystem, because
window manager could declare nested procedure, which could be compiled
and no needs to send signals into window manager. We can drop whole
code of supporting window manager from X Server and suggest Window
Manager developers to attach nested procedures to events of X Server.
Maybe just drop as many messages as we can and force to use nested
procedures to make X Server implementation simpler? I don't know, but
my idea seems to be very mad.

NoMachine NX is a XServer proxy, which allows to bypass X protocol over
25kib modem, so we must achieve something similar!

Yours faithfully,
Lach SÅ‚awomir. 


More information about the xorg-devel mailing list