Board index » delphi » Socket receiving data SLOW in Win XP/2k, fine in Win 98

Socket receiving data SLOW in Win XP/2k, fine in Win 98

Hi,

   I've written a chat application using Delphi 4, which is basically a
dumbed down IRC client.

When I run it under Windows 98, everything works perfectly. Running under
Win XP or 2000, everything is INCREDIBLY slow as far as receiving data goes,
but data sent from these machines using the application is picked up by the
server and other clients just fine. But a message I type from the Win98
client takes 10+ seconds to display on the clients running on Win2k/XP.

Anyone else experience anything like this before, and/or have any
suggestions for a fix?

Thanks!

--
Regards,
Edward T. Smith

 

Re:Socket receiving data SLOW in Win XP/2k, fine in Win 98


What is your CPU usage under Win2k/XP?  If you are using blocking sockets,
you may want to include a sleep(1) in your receive loop.

If using INDY, you may want to update to 9.03 and the latest TIdAntifreeze.
But, it sounds to me like you have a CPU saturation problem.

XP has another issue when used as a server due to QOS.  That will reduce
throughput to 20% of maximum...or so I've been told.

Charles

"Edward T. Smith" <esm...@NOSPAM.xpressamerica.net> wrote in message
news:3cb4817c$1_2@dnews...

Quote
> Hi,

>    I've written a chat application using Delphi 4, which is basically a
> dumbed down IRC client.

> When I run it under Windows 98, everything works perfectly. Running under
> Win XP or 2000, everything is INCREDIBLY slow as far as receiving data
goes,
> but data sent from these machines using the application is picked up by
the
> server and other clients just fine. But a message I type from the Win98
> client takes 10+ seconds to display on the clients running on Win2k/XP.

> Anyone else experience anything like this before, and/or have any
> suggestions for a fix?

> Thanks!

> --
> Regards,
> Edward T. Smith

Re:Socket receiving data SLOW in Win XP/2k, fine in Win 98


Thanks for the reply. =]
No servers on XP/2K, only clients. The server runs from a *NIX box, windows
would be silly. =]

Anyway, CPU usage ranges from 0% to 3%, with or without the sleep, so I
don't believe it's that.

I'd blame my code, if it didn't work so well on 98, and I just tested it on
Win95, and it worked mint there as well.

Only XP and 2K that have problems.............I'll probably give NT4 a test
as well.

Still looking for suggestions! And just in case anyone thinks it, I checked
mem usage as well, and that's not very high at all either.

Thanks!

Quote
Charles Stack <cst...@telocity.com> wrote in message

news:3cb499f2_1@dnews...
Quote
> What is your CPU usage under Win2k/XP?  If you are using blocking sockets,
> you may want to include a sleep(1) in your receive loop.

> If using INDY, you may want to update to 9.03 and the latest
TIdAntifreeze.
> But, it sounds to me like you have a CPU saturation problem.

> XP has another issue when used as a server due to QOS.  That will reduce
> throughput to 20% of maximum...or so I've been told.

> Charles

> "Edward T. Smith" <esm...@NOSPAM.xpressamerica.net> wrote in message
> news:3cb4817c$1_2@dnews...
> > Hi,

> >    I've written a chat application using Delphi 4, which is basically a
> > dumbed down IRC client.

> > When I run it under Windows 98, everything works perfectly. Running
under
> > Win XP or 2000, everything is INCREDIBLY slow as far as receiving data
> goes,
> > but data sent from these machines using the application is picked up by
> the
> > server and other clients just fine. But a message I type from the Win98
> > client takes 10+ seconds to display on the clients running on Win2k/XP.

> > Anyone else experience anything like this before, and/or have any
> > suggestions for a fix?

> > Thanks!

> > --
> > Regards,
> > Edward T. Smith

Re:Socket receiving data SLOW in Win XP/2k, fine in Win 98


Well, I stopped using the TClientSocket that was bundled with D4, and
installed Piette's ICS, changed all the references to the socket control
over to the WSocket, and things work SWEET now. Seems that the TClientSocket
in D4 has a bug that makes it not work very well under Win XP/2K.

Many thanks to Francois Piette for his seeming well constructed controls
that have made life sooooooo much simpler! =]

Edward T. Smith <esm...@NOSPAM.xpressamerica.net> wrote in message
news:3cb4817c$1_2@dnews...

Quote
> Hi,

>    I've written a chat application using Delphi 4, which is basically a
> dumbed down IRC client.

> When I run it under Windows 98, everything works perfectly. Running under
> Win XP or 2000, everything is INCREDIBLY slow as far as receiving data
goes,
> but data sent from these machines using the application is picked up by
the
> server and other clients just fine. But a message I type from the Win98
> client takes 10+ seconds to display on the clients running on Win2k/XP.

> Anyone else experience anything like this before, and/or have any
> suggestions for a fix?

> Thanks!

> --
> Regards,
> Edward T. Smith

Other Threads