Attention is currently required from: neels, laforge, pespin.
Patch set 4:Code-Review +1
1 comment:
File src/osmo-hnbgw/hnbgw.c:
Patch Set #2, Line 348: return talloc_asprintf(OTC_SELECT, "%u-%u-L%u-R%u-S%u-C%u", ucid->mcc, ucid->mnc, ucid->lac, ucid->rac,
I hope this is not called everytime we log a line :)
So the only user of this function is `hnb_context_name()`, which is employed by `LOGHNB`. This means that `talloc_asprintf()` *will* be called every time we log something using that macro, but only if the configured logging level lets the logging message pass.
With Neels we checked how `talloc_asprintf()` works under the hood, and it does not really look that bad. Most of the times it will use its internal stack allocated buffer when calling `asprintf()` and then simply memcpy() it to the allocated heap chunk.
I never used this project and don't know how verbose it is with default logging configuration, but in general I don't think it's super critical. I would have voted CR-1 if this was osmo-bts, which may be running on low end embedded platforms. But I guess this project is expected to be running on some server with plenty of CPU and RAM? If at some point in the future we narrow down performance issues to this function, we can always revert back to using a static buffer, right?
To view, visit change 33169. To unsubscribe, or for help writing mail filters, visit settings.