• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: URL Access performance tuning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: URL Access performance tuning


  • Subject: Re: URL Access performance tuning
  • From: Quinn <email@hidden>
  • Date: Tue, 21 May 2002 14:51:20 +0100

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.

  • Follow-Ups:
    • Re: URL Access performance tuning
      • From: Tom Bayley <email@hidden>
    • Re(2): URL Access performance tuning
      • From: Jens Bauer <email@hidden>
  • Prev by Date: CFNetwork Website
  • Next by Date: Re: Carbon CFM callbacks for CFNetServices
  • Previous by thread: URL Access performance tuning
  • Next by thread: Re(2): URL Access performance tuning
  • Index(es):
    • Date
    • Thread