[comp.windows.ms] Timing of DOS calls in Win3 protected mode

rommel@lan.informatik.tu-muenchen.dbp.de (Kai-Uwe Rommel) (08/16/90)

I'm writing a Windos Application which has to call a communication
driver which is loaded as a TSR before Windows is started. The driver is
loaded as a server for INT 2F and it works well in standard and 386 mode
of Windows 3.0 but I notice a *BIG* performance decrease in protected
mode. 

Now I made some tests to find the reason for this. I wrote a small
windows app. which calls 32768 times the INT 2F and then 32768 time the
INT 21 function "Get DOS version". I ran this app. under Windows 2.11
and under all three modes of Windows 3.0. Here is the result:

			32768 x INT 2F		32768 x Get DOS Version

Windows 2.11			 384ms			 3515ms

Windows 3.0 real		 384ms			 2142ms
	    standard		3900ms			 7415ms
	    386-enhanced	7964ms			12632ms

The INT 2F was a nearly do-nothing call, only to my EGAUTIL8 screen
saver, which is also a INT 2F server and is told this way to reset its
counter.

I'm not surprised by the increase to Windows3 standard mode because this
requires the 286 to be completely reset on any DOS call or INT 2F call
to real mode. But I am *REALLY* surprised by the timings for the 386
mode. As far as I know, the 386 can easily switch back and forth between
real and protected mode. Why this bad timings? They are much worse than
for the 286! This causes me real performance problems in protected mode 
because it slows down my background communication. 

I do not use the builtin communication functions of Windows but my own
for a real working support of the 16550 chip and a big character
buffer, also this has to work with 286mode Windows while running old
apps and this is impossible with the builtin functions. I've added my
own functions as a INT 2F DOS extension (like PRINT, or example). This
works well in protected mode but causes performance problems. BTW, I'm
doing communication at 19200 in the background with a high amount of
data while letting the user working, editing, moving Windows, painting
complicated fonts in the foreground. Therefore you may not have
performance problems when using terminal with a 2400 modem connection.

Does anyone have experience with 19200 and the builtin functions? I did
not find any documentation that says if the 16550 chip is supported, so
I assume, it is not. Some apps like WinQVT crash, when the 16550's FIFO
is enabled, perhaps because Windows does not support this.

Kai Uwe Rommel

--
/* Kai Uwe Rommel
 * Munich
 * rommel@lan.informatik.tu-muenchen.dbp.de
 */