Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] SWT sleep() implementation

Hi -

I have some questions about the SWT implementation of Display.sleep().  Eclipse
on AIX has been observed to burn ridiculous amounts of CPU time (50 - 60%) when
idle.  Java traces have shown that the OS.select() call from Display.sleep() is
responsible for the majority of the CPU time when Eclipse is idle.

The implementation of Display.sleep() was changed in Display.java from version
1.33 to 1.34.  The previous implementation, which uses Xt facilities for
waiting on events, results in no CPU usage on AIX.  Was this change made to fix
a particular bug?  The CVS comment for this change mentions an XInitThreads
problem.

If the select-based sleep implementation is necessary, would it be possible to
increase the timeout value?  Experiments with a timeout value of 100000 us seem
to solve the CPU usage problem, and do not appear to affect responsiveness.

Any thoughts on this would be appreciated.

Thanks-
John

----------------
John Rose
AIX Kernel Development
johnrose@xxxxxxxxxxxxxx



Back to the top