l3cfg: add comment to _acd_data_collect_tracks_data() about linear search

This commit is contained in:
Thomas Haller 2022-01-28 18:48:13 +01:00
parent f00980e5ca
commit d7a951b947
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -1334,6 +1334,15 @@ _acd_data_collect_tracks_data(const AcdData *acd_data,
guint n = 0;
guint i;
/* We do a simple search over all track-infos for the best, which determines
* our ACD state. That is, we prefer ACD disabled, and otherwise the
* shortest configured timeout.
*
* This linear search is probably fast enough, because we expect that each
* address/acd_data has few trackers.
* The alternative would be caching the best result, but that is more complicated,
* so not done. */
for (i = 0; i < acd_data->info.n_track_infos; i++) {
const NML3AcdAddrTrackInfo *acd_track = &acd_data->info.track_infos[i];