ENH: reduce profiling overhead (issue #764)

- avoid clockTime in favour of clockValue.

- avoid allocations when profiling is not active.

- replace hashing with manual pointer lists
This commit is contained in:
Mark Olesen
2018-03-26 21:38:47 +02:00
parent e0d075ff89
commit d901b4f450
8 changed files with 214 additions and 303 deletions

View File

@ -846,13 +846,14 @@ bool Foam::Time::run() const
{
// Ensure functionObjects execute on last time step
// (and hence write uptodate functionObjectProperties)
addProfiling(foExec, "functionObjects.execute()");
functionObjects_.execute();
endProfiling(foExec);
addProfiling(foEnd, "functionObjects.end()");
functionObjects_.end();
endProfiling(foEnd);
{
addProfiling(fo, "functionObjects.execute()");
functionObjects_.execute();
}
{
addProfiling(fo, "functionObjects.end()");
functionObjects_.end();
}
}
}