Attention is currently required from: pespin.

neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/30126 )

Change subject: [codecs filter] use filter result in Assignment
......................................................................


Patch Set 8:

(1 comment)

File src/libmsc/gsm_04_08_cc.c:

https://gerrit.osmocom.org/c/osmo-msc/+/30126/comment/1583eb47_86d845eb
PS4, Line 1797:         codec_filter_run(&trans->cc.codecs);
> I think that was an unconclusive discussion, and probably I was not really 
> happy about that 😊 […]
no, it's not expensive to call codec_filter_run().

In reverse I could ask: what's the point in calling it every time the inputs 
modify when nothing is using the result between input modifications?

Inputs are from various sources, e.g. BSSAP Codec List (BSS Supported), MS 
Bearer Capabilites, the SDP from the remote call leg. It is a simple way to 
just call codec_filter_run() before using its result.

Yes, we could also call it whenever any of the inputs change. We could also 
call it implicitly from every codec_filter_set_foo() function. Neither would 
make much of a difference. I chose to run() before using the result as a simple 
way to not call run() overly often, and I think there's nothing wrong with this 
approach.

If you would like to optimize performance, here is my usual answer: run a 
profiler to measure and prove the places that are inefficient; i'm pretty sure 
the codec filter is not a significant contender.



--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/30126
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I66e7c8c5e401f4f3a7d3d42b9525b2c6e99691d9
Gerrit-Change-Number: 30126
Gerrit-PatchSet: 8
Gerrit-Owner: neels <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-CC: pespin <[email protected]>
Gerrit-Attention: pespin <[email protected]>
Gerrit-Comment-Date: Sat, 18 Mar 2023 01:48:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <[email protected]>
Comment-In-Reply-To: pespin <[email protected]>
Gerrit-MessageType: comment

Reply via email to