🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #67128

Re: Programming/NNTP Questions

#67128
From: aaronb
Date: Mon, 10 Nov 2003 05:31
83 lines
4890 bytes
I have followed your suggestion for timing the responses from the server and
I think I have discovered where the bottleneck really is. I think it's the
process that you described. I believe that it's the way I'm grabbing the
data from the buffer itself and not so much the processing. I've found quite
a few examples of getting data from a NNTP server in C#, but everyone of
them was different and were very basic in nature. I'm still in the dark
about how much data at a time I should be getting from the socket and
putting into the buffer. My current method is to get 256 bytes at a time,
process it form the /r/n, cut one whole message from the XOVER response out
of the buffer, store it, save the excess buffer and add on to it in the next
read... of all the methods I've tried it seems to be working the best so
far. I'm not a very experienced programmer with windows apps, but I have
been programming one thing or another for the past 20 years. Is there any
advice you could give me on methods to use for interacting with the socket
and buffer to get the data in an easier or more productive fashion?

Aaron



"DS" <t.h.i.s.n.t.h.a.t@a.d.e.l.p.h.i.a..n.e.t> wrote in message
news:<Xns94284B9E63709idispcom@24.48.107.53>...
> "aaronb" <borgaaron@yahoo.com> wrote in
> news:3fa1d38d$0$50372$c3e8da3@news.astraweb.com:
>
> > Can anyone suggest a good place to look for discussion programming
> > NNTP applications?
> >
> > I've got some questions regarding socket operations and buffer
> > sizes.... My program is working just fine but I've noticed that
> > changing the buffer size changes things dramatically. I've done some
> > tests with other programs and have found that its about half as fast
> > as most news programs.
> >
> > Anyone have any tips for capturing the data from the socket and
> > processing the headers fields from an XOVER request? I have a process
> > that does it just fine, but I'm beginning to think that the slowness
> > factor in my program is based on how I am processing the buffer,
> > converting the data, and placing it on the screen in a listview...
> >
> > Aaron
> >
> >
>
> As boob said, you have to figure out where, if any, the bottleneck is.
>
> In the newsreader I'm writing, the bottleneck is the database system, as
> I'm slipstreaming messages into multiple databases at the time of the
> XOVER, I'm not writing anything to a temporary file.
>
> I would start out by first, picking a server that has good throughput, and
> a group with a good amount of messages in it.
>
> Then, do a lot of timing tests. Start out by having your program start the
> XOVER, when the buffers full, just dump it and keep receiving data. Time
> this. Next, repeat this, but take the buffer data and break it up into the
> correct fields, then just discard the data again. If it's any slower than
> the first part, you know there's a little time lost in the first step of
> processing, assuming the server d/l speed is consistent.
>
> Just keep doing this until you get through all of the steps the data takes
> from receiving through to displaying, and you should find either that one
> specific step is slowing things down, or all together all of the
processing
> is slowing it down.
>
> Now, after you know where the issues are, (try to) fix it.
>
> Note: In my experience, the standard listview has proven to be quite slow
> in inserting items. Of course, I was trying to add 100,000+ items...the
> grouplist.
>
> For further discussion's outside the group, please feel free to e-mail the
> address above with all but the last dot removed.
>
> Regards,
>
>
> DS
>
> http://users.adelphia.net/~thisnthat/zanews/index.htm

Technical Details
Message-ID: <3faf228c$0$801$c3e8da3@news.astraweb.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!news5.aus1.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!nntp-relay.ihug.net!ihug.co.nz!nntp.cs.ubc.ca!news.UVic.CA!cyclone.bc.net!news.alt.net!news.astraweb.com!news-big.astraweb.com!not-for-mail
References: <3fa1d38d$0$50372$c3e8da3@news.astraweb.com> <Xns94284B9E63709idispcom@24.48.107.53>

Show Full Headers
Complete Article Headers
Message-ID: <3faf228c$0$801$c3e8da3@news.astraweb.com>
Subject: Re: Programming/NNTP Questions
Date: Sun, 9 Nov 2003 21:31:03 -0800
From: "aaronb" <borgaaron@yahoo.com>
References: <3fa1d38d$0$50372$c3e8da3@news.astraweb.com> <Xns94284B9E63709idispcom@24.48.107.53>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!news5.aus1.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!nntp-relay.ihug.net!ihug.co.nz!nntp.cs.ubc.ca!news.UVic.CA!cyclone.bc.net!news.alt.net!news.astraweb.com!news-big.astraweb.com!not-for-mail
Newsgroups: news.software.nntp
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Lines: 83
Organization: Unlimited download news at news.astraweb.com
NNTP-Posting-Host: 1e888c4d.news.astraweb.com
X-Trace: DXC=N5YZW?X?A8=UH[0COH:iH0L?0kYOcDh@:F9c7@BR\fD:cS8507a53^7H4WoOXTH1T3V_?7@`O27_9a>TDTkRWLX>