This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

One source of recent cygwin slowdown


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]