(svn r25885) -Codechange: Keep paths sorted so that the ones with flow == 0 are in the back and don't have to be iterated over so often.
This commit is contained in:
@@ -28,7 +28,7 @@ void FlowMapper::Run(LinkGraphJob &job) const
|
||||
for (PathList::iterator i = paths.begin(); i != paths.end(); ++i) {
|
||||
Path *path = *i;
|
||||
uint flow = path->GetFlow();
|
||||
if (flow == 0) continue;
|
||||
if (flow == 0) break;
|
||||
/* compress to monthly value */
|
||||
flow = max(1U, flow * 30 / runtime);
|
||||
Node node = job[path->GetNode()];
|
||||
|
Reference in New Issue
Block a user