David Megginson wrote:
> Remember Knuth's (?) warnings about premature optimization, though.

Amen.  This blog says Knuth got it from Tony Hoare:

  "We should forget about small efficiencies, say about 97% of the
   time: premature optimization is the root of all evil."
     http://www.cookcomputing.com/blog/archives/000084.html

> In that case, a simple linear search within the chunk and its
> neighbours is probably acceptable; for that matter, a linear search
> through the whole airport list wouldn't be that bad.

Exactly.  A typical use case might be a UI to search through all
airports by name.  So typing in "New York" would pull up Laguardia,
Kennedy, etc...  Users are happy to wait for 2 seconds or so for such
a list.

> If, however, there's a reason that we'd want to redo the airport
> search every frame or every few frames, like we do for the navaids,
> then some kind of indexing will be essential.

Right.  But this indexing of "nearby" objects can be done in memory
(since the set of nearby objects is already available via the tile
set). There's not need for anything fancy on disk.

Andy

--
Andrew J. Ross                NextBus Information Systems
Senior Software Engineer      Emeryville, CA
[EMAIL PROTECTED]              http://www.nextbus.com
"Men go crazy in conflagrations.  They only get better one by one."
 - Sting (misquoted)


_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to