Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Asynchronous OT calls on Mac OS X?



On 6/7/01 5:48 AM Richard Fox (email@hidden) wrote:

>My app does a huge list of reverse DNS lookups, so the best way to
>handle it is to use async calls with a notifier function so that the
>calls can be queued up as some calls will return before others.

The name resolver that Apple is using in OS X is much worse than the one
in OS 9. My testing, doing exactly what you are doing, except with native
BSD style calls on OS X, average 1/3 to 1/5 the speed of OS 9 using OT.
You are experiencing an additional slow down because you are using Carbon
threads (BSD processes are much better in this specific case), but alot
of it is that Apple is using an ancient, badly designed, name resolver in
OS X.

Interestingly, you can run the same thing under Classic (the blue box)
within OS X and it is back to full speed, competitive with other
platforms. This is because Classic uses true OT, while Carbon emulates OT
using BSD sockets. So the optimal solution is to have a little AppleEvent
server running under Classic that does the lookups for your Carbon
application. Users won't like it though.

Jason

-----------------
email@hidden
-----------------
Dr. Seuss books . . . can be read and enjoyed on several levels. For
example, 'One Fish Two Fish, Red Fish Blue Fish' can be deconstructed
as a searing indictment of the narrow-minded binary counting system.
-- Peter van der Linden, Expert C Programming, Deep C Secrets




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.