Bug 127791 - Fix intermittent delays caused in sysutils/synergy
Summary: Fix intermittent delays caused in sysutils/synergy
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Kevin Lo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-02 03:50 UTC by Benjamin Close
Modified: 2008-10-14 02:50 UTC (History)
0 users

See Also:


Attachments
file.diff (2.83 KB, patch)
2008-10-02 03:50 UTC, Benjamin Close
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Close freebsd_committer freebsd_triage 2008-10-02 03:50:00 UTC
There is a bug in synergy that causes delays under the current X windows version when using synergyc.
Below is a description of the report submitted to sourceforge. However since the synergy project hasn't been updated in close to 2 years I figured a local fix was also in order.

--- 
Bug description:

There is poor assumption in the synergy XWindowsEventQueue class. The assumption is 
that all events will cause a change on the Xwindows file descriptor. This
is not true. Some events are queued in the Xlib buffers. This is extremely
noticable with the new xcb version of Xorg.

It causes synergy to hang or delay for a period of time (timeout value in
waitForEvent) as there is no event on the fd to wake up the thread. This
delay is VERY annoying.

The fix is to check for events not only from the server itself but also in
the xlib event queue. We don't need to lock this test as it's a non
blocking io call.

We change the XPending call in isEmpty to QueueLength to avoid the XFlush
call that XPending may cause.

This fix eliminates the delay at the cost of a little more cpu time - still
< 1% on my box.

Fix: The attached patch is a bump to port revision and also contains the required patch to fix the problem. Should just be able to apply.

Please note I don't have a ports commit bit so can't commit this.

Patch attached with submission follows:
How-To-Repeat: Use synergyc on FBSD to connect to a synergy server.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2008-10-02 04:53:17 UTC
Responsible Changed
From-To: freebsd-ports-bugs->kevlo

Over to maintainer.
Comment 2 dfilter service freebsd_committer freebsd_triage 2008-10-14 02:48:43 UTC
kevlo       2008-10-14 01:48:29 UTC

  FreeBSD ports repository

  Modified files:
    sysutils/synergy     Makefile 
  Added files:
    sysutils/synergy/files 
                           patch-lib__platform__CXWindowsEventQueueBuffer.cpp 
  Log:
  - Fix intermittent delays
  - Bump PORTREVISION
  
  PR:     ports/127791
  Submitted by:   benjsc@
  
  Revision  Changes    Path
  1.18      +1 -1      ports/sysutils/synergy/Makefile
  1.1       +58 -0     ports/sysutils/synergy/files/patch-lib__platform__CXWindowsEventQueueBuffer.cpp (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Kevin Lo freebsd_committer freebsd_triage 2008-10-14 02:48:46 UTC
State Changed
From-To: open->closed

Committed, thanks!