Help with fixing x2x...
Thomas Chadwick
j_tetazoo@hotmail.com
Tue Jul 23 19:16:00 GMT 2002
I recently discovered that when I run x2x, the Win2k Task Manager reports
that it's using 90-99% of the CPU.
While I have not noticed a slow down in performance when it's running, I'd
like to fix it if I can. I've poked around in the source and I don't like
the looks of the main loop:
while (True) { /* FOREVER */
if (fromPending = XPending(fromDpy))
if (ProcessEvent(fromDpy, &dpyInfo)) /* done! */
break;
if (XPending(toDpy)) {
if (ProcessEvent(toDpy, &dpyInfo)) /* done! */
break;
} else if (!fromPending) {
FD_ZERO(fdset);
FD_SET(fromConn, fdset);
FD_SET(toConn, fdset);
select(nfds, fdset, NULL, NULL, NULL);
}
It would appear to me that this constant polling for an event to process is
what's eating up the CPU cycles.
Not being an X programmer, I'm hoping someone monitoring the list can
suggest a way to modify this loop to be less of a CPU hog.
Thanks.
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
More information about the Cygwin-xfree
mailing list