This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
One source of recent cygwin slowdown
- To: cygwin-developers at cygwin dot com
- Subject: One source of recent cygwin slowdown
- From: Christopher Faylor <cgf at redhat dot com>
- Date: Mon, 21 May 2001 15:40:24 -0400
- Reply-To: cygwin-developers at cygwin dot com
I did an exhaustive search of cygwin checkins last weekend to
attempt to determine the source of the 1.3.1 slowdown over 1.1.8.
I was surprised to find out that slowdown came about due to the
fhandler_dsp.cc checkin. The slowdown was due to the Audio constructor
which was being called for a static use of the class.
Looking at the code, I don't see any obvious reason for a 10% slowdown
however, it is obvious that a normal user of the Cygwin DLL shouldn't be
suffering any performance consequences from the initialization of dsp
handling. The alternative is to slow down cygwin every time we add a
new device.
My solution to this problem was to use a static pointer to the class that
is established only when /dev/dsp is opened. I'm not sure if this is
the most elegant solution or if this will work correctly with fork.
It did result in a +10% improvement, though.
Just a cautionary note.
cgf