Ok, I just had a really brief look at the output, but it strikes ma as suboptimal to scan the entire database periodically rather than performing incremental updates, by just pulling the subset of articles that were edited since the last update and adjusting linkage accordingly.