Re: Slow XQueryPointer?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


> You don't have to convert the entire app to XCB to be able to use it for
> just one or two calls, for example, most of xdpyinfo uses libX11 calls
> still, but the loop to list extensions uses xcb to be able to send all
> the queries and then wait for all the responses instead of doing a
> blocking call for every single extension:

Yes, but then I'd depend on libxcb (or have to dive into dlopen and friends).

> Simplest thing (although kind of hideous) might be to launch another
> thread with its own Display connection and only ever run XQueryPointer
> from that, save the coordinates in some shared variable protected by a
> mutex, and read from that in the main thread.  Or in a separate process
> over a pipe, if you don't like threads.
> I don't really know what you need the result for, though, so I don't
> know if that's a viable technique for you.

It's used once per frame for 3d movement (yeh, game). A thread might work.

Attaching a bench app I've used in tracking this down. Run it with some apps open (browser, IRC client, some terminals...) and watch the max number.
Perhaps it'll help, I don't remember how long running a x11perf test took.

- Lauri

Attachment: bench.c
Description: Binary data

xorg@xxxxxxxxxxx: X.Org support
Your subscription address: list-xorg@xxxxxxxxxxx

[X Forum]     [Nouveau Driver]     [Devices]     [XFree86]     [XFree86 Newbie]     [Site Home]     [IETF Annouce]     [Security]     [Fontconfig]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Video for Linux]     [Linux RAID]     [Linux Resources]

Powered by Linux