RE: URL Access performance tuning
RE: URL Access performance tuning
- Subject: RE: URL Access performance tuning
- From: "Pietrzak, Bryan" <email@hidden>
- Date: Tue, 21 May 2002 09:03:22 -0600
OK, one suggestion I'd have is some way for the OS to help us determine what
to frequency to use for URLIdle. Some kind of feedback mechanism that says
"call me more often" or "whoa, that's too much for me". I was thinking I
could maybe access the QuickTime preference for the connection speed (not
sure if it's accessible or not), so that I wouldn't have to duplicate that
effort in my UI.
Since it sounds like URL Access is being actively maintained that kinda of
answers my questions. I was afraid that maybe URL Access was some
implementation from the Public Beta days and that there was no one looking
at it to see if it could be improved. :)
Bryan
-----Original Message-----
From: Quinn [
mailto:email@hidden]
Sent: Tuesday, May 21, 2002 8:51 AM
To: opentransportdev
Subject: Re: URL Access performance tuning
At 15:18 -0600 14/5/02, Pietrzak, Bryan wrote:
>
I'm using the URLAccess APIs in Carbon to download 1-n files from a remote
>
HTTP server.
>
>
A few questions:
>
>
1) What is the best frequency to use for URLIdle()? The URLAccessSample
code
>
is calling it from a timer every millisecond. That seems pretty frequent,
>
but is that the ideal value?
>
>
2) How many concurrent downloads (via URLOpen) can I make? Should I wait
>
until each file is downloaded before grabbing the next one, or should I
have
>
2, 4, 8, ? concurrent downloads going to make better use of resources? All
>
files will be downloaded from the same server if that makes a difference.
These two questions have no good answer. The problem is that it
depends on how well connected you are to the server. For example, if
you have a direct gigabit connection to the server, you can't call
URLIdle fast enough. OTOH, if you are connected via a modem, calling
URLIdle every millisecond is probably too fast. Also, if you have an
extremely congested connection to a lightly loaded server opening
multiple connections is a good idea, whereas if you have a lightly
loaded link to a very congested server you should only open one
connection.
What you need to do is to take your code out into the field and test
it with real user scenarios, and then tune for that.
>
3) How performant (is that really a word?) is URLAccess in Carbon on OS X?
As a rule URL Access is not the best option for either performance or
efficiency. It is, however, very easy to use.
>
Is it built on top of Open Transport, or does it use a lower level
>
implementation built on top of CF, or does it use BSD sockets?
That depends on the version of Mac OS X. It's been rewritten, oh,
about have a dozen times (-:
>
Basically, I
>
guess I'm asking, how "bad" is it for me to use URL Access to download a
>
bunch of files? Am I burning an extraordinary number of CPU cycles and
>
wasting network resources?
I'll take a pragmatic approach and ask "How often does the user do
this?" If they only do it once a month for software updates, who
cares?
S+E
--
Quinn "The Eskimo!" <
http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
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.