Re: Five Reasons Why Synchronous Networking Is Bad
Re: Five Reasons Why Synchronous Networking Is Bad
- Subject: Re: Five Reasons Why Synchronous Networking Is Bad
- From: Jens Alfke <email@hidden>
- Date: Fri, 6 Mar 2009 12:24:03 -0800
On Mar 6, 2009, at 9:11 AM, james woodyatt wrote: This is one of those cases where the problem isn't really caused by using synchronous interfaces to the filesystem so much as by excessively eager evaluation. I have projects with 100k+ files in them that are simply unusable, even on fast, locally attached volumes, because of this basic class of problem.
It's another instance of polling. To be fair, though, the public APIs to get notifications of filesystem events are pretty recent (10.5). TextMate's barely been updated at all in years, and I'm sure the Xcode team had dozens of mandated features that trumped rewriting the project checking code.
And filesystem events don't work on network filesystems, so they wouldn't have helped in my case anyway. The basic rule of interactive programming to keep in mind here is this: don't waste valuable time with unnecessary computation. (I'm sure some famous computer scientist has a pithy quote I could drop to that effect, but I'm not going to go looking for one right now. Sorry.)
I think the quote is something like "the fastest possible code is no code at all". Not sure who said it.
—Jens |
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden