🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #157352

What could be causing this delay ?

#157352
From: Jeff Relf
Date: Fri, 22 Oct 2004 19:24
46 lines
2028 bytes
Hi there NNTP programmers,

If you can tell me why my downloads are 14 times slower
than Dialog's I'd greatly appreciate it.

With my broadband connection  ( Comcast.COM ),
40Tude Dialog took 66 seconds to download the headers/bodies
of the last 2,000 messages in Sci.Physics.

But my program
( X.CPP, http://www.Cotse.NET/users/jeffrelf/X.CPP )
can't seem to do it in under 920 seconds... 14 times slower.

  //  Get the most recent 2000 articles from the NNTP server.

  Loop( 2000 ) Dia( 1, "Article %u", J + Bot_ID );

  #define Loop( N ) int J = -1, LLL = N ; while ( ++ J < LLL )

I've tried everything I could think of to speed it up,
including bumping up buffer sizes:

  int Buf_Sz = 100000, SzInt = sizeof int ; 

  setsockopt( Socket, SOL_SOCKET, SO_RCVBUF,
              ( char * ) & Buf_Sz, SzInt );

  //  This confirms the 100,000 byte buffer is there.

  getsockopt( Socket, SOL_SOCKET, SO_RCVBUF,
              ( char * ) & Buf_Sz, & SzInt );

  //  This pseudo code shows a well buffered call to recv()

  char Buff [ Buf_Sz ];
  recv ( Socket, Buff, Buff_SZ, 0 );

I've disabled everything but the downloading itself,
to see if the slowness might be caused by something else.

I've tried both GetMessage() and PeekMessage() with Sleep()
when waiting for the  FD_READ  event.

What could be causing this delay ?

Technical Details
Message-ID: <_Jeff_Relf_2004_Oct_22_qAM5@Cotse.NET>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!fu-berlin.de!uni-berlin.de!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <_Jeff_Relf_2004_Oct_22_qAM5@Cotse.NET>
Subject: What could be causing this delay ?
Date: Fri, 22 Oct 2004 19:24:44 +0000
From: Jeff Relf <Me@Privacy.NET>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!fu-berlin.de!uni-berlin.de!not-for-mail
Newsgroups: news.software.readers
Lines: 46
X-Trace: news.uni-berlin.de 9OBPtw1Y3MkeYaJXgit6SwHjSYc4LZq962hfYIJve+KWMJGCSf