X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: zeo AT logicplant DOT com Newsgroups: comp.os.msdos.djgpp Subject: Watt32 with DJGPP - read performance is extreamly poor Date: 18 Jul 2005 18:42:27 -0700 Organization: http://groups.google.com Lines: 57 Message-ID: <1121737347.351585.124950@g43g2000cwa.googlegroups.com> NNTP-Posting-Host: 218.153.76.98 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1121737352 30292 127.0.0.1 (19 Jul 2005 01:42:32 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Tue, 19 Jul 2005 01:42:32 +0000 (UTC) User-Agent: G2/0.2 Complaints-To: groups-abuse AT google DOT com Injection-Info: g43g2000cwa.googlegroups.com; posting-host=218.153.76.98; posting-account=QZ8mAQwAAADGDSjtF3mYFO8QPMNgREeg To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I use Watt32 with DJGPP for my 32-bit protected DOS program. My program reads a large bulk of data (usually > 1GB) to process. And I also wrote nearly the same program that runs on Windows XP. (actually, a large portion of the source code is shared) But when I compare the two programs, the DOS program that uses Watt32 + DJGPP is 60 times slower than the Windows XP counterpart. That is, while the program on Windows XP finishes a task in 2 minutes, DOS version takes 2 hour to complete the same task. BTW, my programs can also process the data on local disk. When I ran two programs for the local data, performance difference was not that great. (DOS version is 1.5~2 times slower. The reason is that the Windows program uses threads for some background subtask.) 60 time slow is too much. And when I tested socket read alone, DOS version took 22 secs to read 3MB data. It is somewhat... ridiculous. Is there anyone experienced the same problem like me? I suspect the configuration, but cannot find any problem. The part of the source code that reads data using Watt32 is as follows. ========= int OGSocket::recv(char *a_pBuff, int a_len) { waitInput(); int ret = sock_fastread(m_pSock, a_pBuff, a_len); return ret; } void OGSocket::waitInput() { if (_ip_delay1(m_pSock, sock_delay, NULL, NULL)) throwError(_T("waitInput failed")); } void OGSocket::throwError(const TCHAR *a_sMsg) { throw OGException(OGERR_WT_SOCKET_ERROR, OGUtil::format(_T("%s (%s)"), a_sMsg, sockerr(m_pSock)).c_str()); } ========== and WATTCP.CFG is as follows (simple) ========== MY_IP=DHCP ========== Thanks in advance.