diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2010-06-13 12:42:34 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2010-07-07 10:46:47 -0700 |
commit | 96f19bade9ce4940642d580f4c52e2bc0e3539ab (patch) | |
tree | 5e3ecda97f424e670437a05a085efa9caa8e51fe /configure.ac | |
parent | 123ff05c2e2bbdb9d7d6d958d9f096cf854b8360 (diff) |
Convert from Xlib to xcb
Testing was done with a simple GNOME 2.28 session with a number of
applications open (gnome-terminal, VirtualBox, Firefox).
Primary test case was xwininfo -root -all, which listed 114 children of
the root window. Output was identical to Xlib version (after applying
the fix to libxcb_icccm for always null-terminating wm_class properties).
Over a local connection on the same machine:
Xlib: 0.00u 0.01s 0:00.05 20.0%
xcb: 0.00u 0.00s 0:00.02 0.0%
(i.e. barely measurable difference - I had more variation between
repeated runs of the command)
Introducing latency by running over ssh -X from California to Beijing
and back:
Xlib: 0.03u 0.02s 8:19.12 0.0%
xcb: 0.00u 0.00s 0:45.26 0.0%
Memory size when exit() is called:
Xlib:
Address Kbytes RSS Anon Locked Mode Mapped File
08043000 20 20 20 - rw--- [ stack ]
08400000 144 144 144 - rw--- [ heap ]
total Kb 8972 8640 316 -
xcb:
Address Kbytes RSS Anon Locked Mode Mapped File
08045000 12 12 12 - rwx-- [ stack ]
0806C000 100 100 100 - rwx-- [ heap ]
total Kb 7980 7692 288 -
Bytes sent & received (counted by proxying via xscope):
Xlib: Client --> Server: 21380 bytes Client <-- Server: 54124 bytes
xcb: Client --> Server: 21114 bytes Client <-- Server: 53160 bytes
(The Xlib code didn't save any replies, so re-requested a couple of things
when running with -all - I fixed that while porting to xcb, but the same
could be done with Xlib easily too.)
Not yet handled: WM_NAME properties that need to be converted from another
character encoding.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: James Cloos <cloos@jhcloos.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 7ef640a..3337c6c 100644 --- a/configure.ac +++ b/configure.ac @@ -43,5 +43,7 @@ AC_CHECK_FUNCS([strlcat]) # Checks for pkg-config packages -PKG_CHECK_MODULES(XWININFO, xext x11 [xproto >= 7.0.17]) -AC_SUBST(XWININFO_CFLAGS) -AC_SUBST(XWININFO_LIBS) +PKG_CHECK_MODULES(XWININFO, [xcb >= 1.6] xcb-icccm xcb-shape) +# Even when using xcb, xproto is still required for Xfuncproto.h +# and libX11 headers for cursorfont.h +PKG_CHECK_MODULES(XLIB, x11 [xproto >= 7.0.17]) +XWININFO_CFLAGS="${XWININFO_CFLAGS} ${XLIB_CFLAGS}" |