# # patch "ChangeLog" # from [84f332f7b746fc024cc3d5ba8a7e517c421462c0] # to [be4a709afac1a9612ec0cdbd4c142975afd10d45] # # patch "revision.cc" # from [b90b4de954657d808ecfec14c81b182dd103ce83] # to [46c7406a0e98ce37fd1ae0d900531a07c34480c1] # --- ChangeLog +++ ChangeLog @@ -1,5 +1,11 @@ 2005-05-10 Timothy Brownawell + * revision.cc: Make expand_{ancestors,dominators} twice as fast. + Loop over revisions in the other direction so that changes at the + frontier propogate fully in 1 pass, instead of one level at a time. + +2005-05-10 Timothy Brownawell + * packet.{cc,hh}: Give packet_consumer and children a callback to call after writing out a revision. * netsync.cc: Use this callback to add a "revisions written" ticker, --- revision.cc +++ revision.cc @@ -332,8 +332,8 @@ nodes.reserve(dominators.size()); // pass 1, pull out all the node numbers we're going to scan this time around - for (std::map::const_iterator e = dominators.begin(); - e != dominators.end(); ++e) + for (std::map::reverse_iterator e = dominators.rbegin(); + e != dominators.rend(); ++e) nodes.push_back(e->first); // pass 2, update any of the dominator entries we can @@ -398,8 +398,8 @@ nodes.reserve(ancestors.size()); // pass 1, pull out all the node numbers we're going to scan this time around - for (std::map::const_iterator e = ancestors.begin(); - e != ancestors.end(); ++e) + for (std::map::reverse_iterator e = ancestors.rbegin(); + e != ancestors.rend(); ++e) nodes.push_back(e->first); // pass 2, update any of the ancestor entries we can