One source of recent cygwin slowdown
Christopher Faylor
cgf@redhat.com
Mon May 21 12:42:00 GMT 2001
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
More information about the Cygwin-developers
mailing list