Rootless mode logging and slowness

Harold L Hunt II huntharo@msu.edu
Thu Oct 17 14:12:00 GMT 2002


Some of you have noticed that a message is being added to /tmp/XWin.log 
every time that winAddRgn (or something close to that) is called.

Other of you have also noticed that certain window operations and other 
random operations are slower than expected in Cygwin/XFree86 with 
rootless mode enabled.

It turns out that these two issues are related.  The winAddRgn function 
is being called many, many, many thousands, if not hundreds of thousands 
of times and the average window operation may cause it to be called 
several hundred times.  As you can imagine, writing a message to the log 
file during every one of these calls is an extraordinary burden.

I built a test version for my own purposes with this logging message 
disabled and I fully expected the performance hit to go away.  Well, it 
did, for the most part.  I would estimate that about 95% of the slowdown 
in rootless mode was caused by this errant logging, but the rootless 
mode is still a little bit slower than non-rootless mode.  However, the 
performance hit is now well worth the features and new usage scenarios 
that rootless mode provides.

I used Cygwin/XFree86 today in rootless mode for several hours while 
creating a LaTeX  document for my homework and creating figures for that 
document in xfig.  Rootless mode made it so much easier to switch 
between emacs and xfig running under Cygwin/XFree86 to Adobe Acrobat or 
to Mozilla running under Windows.  (Yes, I know, I could use ghostscript 
to view my pdf, but gs keeps crashing on startup whenever I try to run 
it; also, Acrobat is much more user-friendly than gs).

So, rootless mode makes Cygwin/XFree86 actually useful for the primary 
maintainer to get some work done!  This is astonishing!  :)

Harold



More information about the Cygwin-xfree mailing list