FW: Open Transport file transfers
FW: Open Transport file transfers
- Subject: FW: Open Transport file transfers
- From: michael linden <email@hidden>
- Date: Thu, 20 Feb 2003 16:50:33 -0500
Did some testing with your recommendations, however little changed. Did get
better performance with OSX by setting WNE to 1 however. A zero was slower.
One thing that I tried, and if someone could explain to me why this is the
case, I went ahead and put in an 'OTIdle()' call in an idle callback
routine while doing the xfer, and it cut the xfer time by 40%, this is still
3 times longer than with OSX running. Again, this is running in classic OS9
mode only. 'OTIdle()' appears to cause some problems as well as slow down
the xfer when running OSX.
Everything I read says that OTIdle is not required??? Even for Async
operation.
Thanks for your help...
MikeL
----------
From: Matt Mashyna <email@hidden>
Date: Thu, 20 Feb 2003 08:49:28 -0500
To: michael linden <email@hidden>, Mac networking Mail List
<email@hidden>
Subject: Re: Open Transport file transfers
I hope my memory is correct. I ran into something like this when I
ported my FTP client to carbon. It was really sluggish when I did the
port and I tracked it down to the WNE loop. It behaved much
differently on X than it did in 8/9. My transfer is done in a thread
that calls YieldToAnyThread often enough to let other processes
breath while it's going. It's early and I'm trying to remember from
two years ago so cut me some slack if I'm dreaming. If I remember
right, it was a matter of balancing the sleep time on the WNE loop so
that the main thread and the transfer thread didn't starve each
other. On X a high sleep time made the transfer sluggish. On 8/9 a
low sleep time made the transfer sluggish. So, I check the OS and set
it accordingly.
Here's a snippit from my code:
int main(void)
{
EventRecord gEvent;
OSErr err;
short windowCode;
WindowPtr whatWindow;
long sleepTime = 15;
long CarbonVersion = 0;
OSErr gestErr = Gestalt(gestaltCarbonVersion, &CarbonVersion);
if(gestErr || CarbonVersion < 0x0140)
{
::StopAlert(999, nil);
return 0;
}
InitEverything();
if(IsOS_X())
sleepTime = 1;
progress = new ProgressWindow;
err = CreateThreadPool(kCooperativeThread, 4, 0);
progress->SetFileCount(0,0);
progress->SetInfo("");
progress->SetStatus("Idle");
while(!gDone || gProcessingEvents)
{
if(WaitNextEvent ( everyEvent, &gEvent, sleepTime, NULL) )
{
...
}
}
...
}
At 8:15 AM -0500 2/20/03, michael linden wrote:
>
Ran some tests with the same code running in all three environments:
>
>
To transfer a 9.6 MByte file w/OT using a TCP socket connection:
>
>
In OSX, App running carbon mode under OSX: 30 seconds
>
In OSX, App running under classic mode, under OSX: 30 seconds
>
In System 9.2.2 classic mode (no OSX running): 220 seconds
>
(when it didn't time out)
>
>
Anyone with any ideas on what might be happening?
>
>
The code is from the PowerPlant class for networking using OT, and it
>
appears to be running in async mode.
>
>
Again, thanks in advance...
>
>
>
> From: michael linden <email@hidden>
>
> Date: Wed, 19 Feb 2003 10:48:56 -0500
>
> To: Mac networking Mail List <email@hidden>
>
> Subject: Open Transport file transfers
>
>
>
> Anyone,
>
>
>
> Can anyone point me in the right direction as to where I can find out how to
>
> speed large file downloads with OT running in Classic.
>
>
>
> The carbon Application transfers large files fine in OSX with OT, but when
>
> running in Classic it is extremely slow, with long pauses and often times
>
> out with a time out of 1 minute set. Same code running in both environments.
>
>
>
> Thanks in advance...
>
>
>
> Mike Linden
>
> _______________________________________________
>
> macnetworkprog mailing list | email@hidden
>
> Help/Unsubscribe/Archives:
>
> http://www.lists.apple.com/mailman/listinfo/macnetworkprog
>
> Do not post admin requests to the list. They will be ignored.
>
_______________________________________________
>
macnetworkprog mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
>
Do not post admin requests to the list. They will be ignored.
--
----------------------------------------------------------------
Matt Mashyna
email@hidden
The Frodis Co.
814.451.0660
http://www.frodis.com
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.