[Update] Patch to not fork/exec xkbcomp on X Server initialization

Paulo Cesar Pereira de Andrade pcpa at mandriva.com.br
Fri Jul 4 15:21:38 PDT 2008


  Hi,

  Daniel, can you give your opinion on these patches please?

  They should be applied on server-1.4-branch. I am attaching
a compressed version as it is over 7K lines of patches.

(My interest on these patches is to reduce the X Server load
time for like half the time in some custom projects, but with
proper adjustments, the benefits could go upstream...)

  It defaults to use /usr/share/X11/xkb/compiled to store
compiled keymaps, and that directory probably should have mode
777 and stick bit set (or be owned by the only X user in the system).
  If a compiled file exists, and is not a regular file, it causes
an error, so it doesn't overwrite existing files, neither attempt
to read non regular files.

  This probably need some version release on xkb, as it drops
all the geometry code. The X Server really should not be parsing
neither knowing about keyboard key's color/position/logo/text/size/etc.

  It appears to work correctly in my standard environment, but
I don't use neither kde nor gnome... But it may fail with some
clients, like xorgcfg that should not depend on xkb extension
available, neither want to know about keyboard geometry.

  This is a kind or prototype set of patches. And most likely has
some trivial bugs included as a feature, and needs a big review
if going to be an "official patch".


  I was going to try to add a simplified version of xkbcomp
to the X Server, and like have it's main() renamed to
xkbcomp(int ac, char *av) or similar, but that probably would
just create incompatibilities in the long term, and it probably
would cause problems due to the "xkbcomp" function opening a
lot of files and using a lot of memory at startup. So I think
it is better to use a cache file, and fork/exec xkbcomp only
if once to create that file.

Paulo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: xkbcomp-patches.tar.bz2
Type: application/x-bzip
Size: 38358 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20080704/93a05ac9/attachment.bin>


More information about the xorg mailing list