Mike's Musings #5: FSX Nirvana Demystified

By Mike McCarthy (10 January 2007)

With the kind permission of Nels Anderson, in some number of months this article will be republished on my writing web site, www.thewritingblog.com, which will be under construction just as soon as I get a round tuit. There you will find articles on many different subjects, not just on aviation.


Hank Cooper in Nova Scotia wrote to say that he had implemented the recommendations in Musings #4 with excellent results. He is the only person to have written in with such a statement. In contrast to Hank, someone on the FSX forum, someone who had not tried my approach, dismissed my findings as a "tweak", suitable only for posting in the pinned thread along with all of the other dozens of tweaks. (Apparently he missed my point. He's interested in graphics issues but he failed to grasp that index search times gate the graphics issues.)

In the immortal words of Anonymous, "You can lead a horse to water but you can't make him drink." Still, regarding the lack of feedback and therefore apparent general lack of understanding, Nels Anderson suggested that maybe I wasn't presenting the FSX and MFT issues in the right way.

I now agree. I therefore thought very hard about how to simplify the main Musings #4 discussion points, and here's what I came up with. Oversimplifying for the sake of clarity ...


The MFT, the XP file system's Master File Table, acts very much like an old-fashioned library index card catalog. Each card in such a catalog (each entry in the MFT) points to a book (a folder). Each book/folder contains a table of contents (a sub-index) pointing to the chapters within the book (folders within folders, and so on).

The catalog cards are organized alphabetically by the titles of the books. (There was also a separate catalog which listed the books by subject, but we'll ignore that one.) Given the name of the book you're after you can do a very efficient catalog search. Assuming the catalog cards to be in alphabetical order, start in the middle of the catalog and look at that card. If the name on the card is lower in the alphabet than the name of your book of interest, go to the upper half of the catalog and look at the card which is in the middle of the upper half. And so on.

Every time you look at a catalog card you might need to go lower in the alphabet, or higher, but at each step you will be narrowing the search significantly, and you will soon arrive at the card which exactly matches the name you are looking for. This kind of search is called a "binary search", and it is the fastest possible kind of search through indexes.

But let's say that the card catalog is not organized alphabetically. In fact, let's assume that the cards are in random order, just as your MFT would be in random order absent the UD or O&OD name sort. In this situation you can still locate a book, but to do so you must begin at the front of the catalog and look at every card in sequence until you happen upon the card of interest. We'll call this a "linear search".

Linear searches are slow. In fact, if you think about it, on average you would have to go through half the cards in the catalog to get to a book with a randomly chosen name. That's why the catalog/MFT name sort is so important to FSX performance. When scenery indexes and scenery files are to be loaded, a name sort allows the file manager to do fast binary searches instead of slow linear searches.

Now ... The "MFT adjacency" feature of UD does not affect either the catalog contents or the books' tables of contents. Rather, it has to do with how far you must walk from the catalog drawers (the MFT) to the bookshelves (where the folders are).

Each catalog card contains a unique Dewey Decimal Number which you can think of as a pointer into the bookshelves (the on-disk file structures). Such DDN pointers are entirely equivalent to the contents of MFT entries.


Now why didn't I think of all this sooner? Armed with this information, try going back to Musings #4 and reading it again. Let me know what happens, yes?

Mike McCarthy
xxmikexx@qwest.net

Discuss This in our Outer Marker (Feedback) Forum.


[ Back | Home | Main Menu | Logout | Help ]

Copyright © 2007 by FlightSim.Com. All Rights Reserved.