Mac OS 9 and sockets - are they slow?

Frank Leahy frank at backtalk.com
Mon Jan 12 13:00:32 EST 2004


Scott,

You should be careful about using datagram sockets -- my understanding 
is that there is no guaranteed delivery when using datagrams, unlike 
when sending via normal sockets, and so you can lose packets and never 
know it.

As for the speed issues someone was seeing under OS9, a long time ago I 
built a web server using pre-OSX (it was even pre-OpenTransport), and 
the speed was absolutely fine.  (I've also been using a net app under 
OS 9 on my OSX box, and it runs just fine.)  One guess about the 
problems you're seeing is that it may not be getting enough cycles to 
connect, read, write, etc.  If you're sitting in a tight loop waiting 
for a socket connection, or waiting on a send or receive, try using the 
callback message forms instead. (And if you're already using the 
callback messages then I'm not sure what to tell you.)

-- Frank

On Monday, January 12, 2004, at 04:00 PM, 
use-revolution-request at lists.runrev.com wrote:

> Message: 8
> Date: Mon, 12 Jan 2004 07:48:05 -0700
> From: "Scott Slaugh" <xslaugh at hotmail.com>
> Subject: Re: Mac OS 9 and sockets - are they slow?
> To: use-revolution at lists.runrev.com
> Message-ID: <BAY1-F170tCYJRe3l1M0000bc09 at hotmail.com>
> Content-Type: text/plain; format=flowed
>
>> In Classic mode, all networking has to be rewired to
>> go through OS X networking protocols, so that's one
>> explanation for the delay.
>> Another is that MacOS pre-X never had a really robust
>> TCP/IP stack, and was alywas a bit on the slow side.
>> But maybe someone else can offer you hints on speeding
>> things up.
>
> I also discovered that I got a huge speed increase if I used datagram
> sockets instead of normal sockets.
>
> Scott Slaugh


More information about the use-livecode mailing list