the route i would take would be to maintain 2 database tables, one table a list of every file in the project and the other a list of which files link to which others. you could build this once and generate your documentation once, so browsing wouldn't generate any load. then you'd probably want to run a script once per night perhaps which checks the modification time of each doc and scans them for changes, and if necessary updating the db and regenerating a new static page.