Skip to content

wifi: reuse NiChangesPerBand iterators

Continuing the work from MR !677 (merged) on speeding up the TAKES_FOREVER wifi-primary-channels test suite.

Profiling indicated that a lot of time was spent on InterferenceHelper::GetNextPosition/GetPreviousPosition and a find call.

The find call can be traced back to m_niChangesPerBand.find.

That find call is called not only by the GetNextPosition|GetPreviousPosition, but also by their callers AppendEvent|UpdateEvent, that already have the iterator pointing to the NiChanges map of the target band.

By replacing the target band with the iterator, cache misses are reduced, which translated into an additional reduction of 47 minutes of the wifi-primary-channels runtime.

time ./build/utils/test-runner --fullness=TAKES_FOREVER --test-name=wifi-primary-channels
PASS wifi-primary-channels 3636.350 s

real	60m37.142s
user	60m25.040s
sys	0m8.372s
Edited by Gabriel Ferreira

Merge request reports

Loading